织梦CMS - 轻松建站从此开始!

欧博ABG-会员注册-官网网址

欧博官网Make a custom cursor

时间:2026-01-22 09:30来源: 作者:admin 点击: 0 次
Hello! I am trying to make a custom cursor for my game, however I need to make it change to different cursors when I hover over things. Like text boxe

Guest422349 (Guest 422349) August 24, 2023, 6:36pm 1

Hello! I am trying to make a custom cursor for my game, however I need to make it change to different cursors when I hover over things. Like text boxes or buttons.
How do I do this?

Current Script:

local userInputService = game:GetService("UserInputService") local starterGui = game:GetService("StarterGui") local cursorGui = script.Parent:WaitForChild("Cursor") local cursorImage = cursorGui.Cursor userInputService.MouseIconEnabled = false starterGui:SetCoreGuiEnabled("All", false) local normalCursor = "rbxassetid://7025168168" local hoverCursor = "rbxassetid://7025167191" local textCursor = "rbxassetid://79572790" while wait() do if userInputService.KeyboardEnabled then script.Parent.Cursor.Enabled = true local mouseLocation = userInputService:GetMouseLocation() cursorImage.Position = UDim2.fromOffset(mouseLocation.X, mouseLocation.Y) else script.Parent.Cursor.Enabled = false end end

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2026-01-22 11:01 最后登录:2026-01-22 11:01
栏目列表
推荐内容