Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

can you change the click detector cursor?

Asked by 8 years ago

can you change the click detector cursor to make it look nicer or better?

0
No, you can't, at least as far as I know. You could try a different method, but it's kinda complicated. TheDeadlyPanther 2460 — 8y
0
could you tell me what that other method is? or give me a hint? supamaster888 28 — 8y
0
If you use the "Mouse.Moved" event, you can set the curser to a roblox asset based on "Mouse.Target". GoldenPhysics 474 — 8y

2 answers

Log in to vote
0
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
8 years ago

You could change the mouse's icon everytime the event MouseHoverEnter is fired, and then reset it back to the default when the event MouseHoverLeave fires.

Example:

local clickDetector = LOCATION_OF_CLICKDETECTOR
local icon = "rbxassetid://ASSET_ID"

clickDetector.MouseHoverEnter:connect(function(player)
    local mouse = player:GetMouse()
    mouse.Icon = icon
end)

clickDetector.MouseHoverLeave:connect(function(player)
    local mouse = player:GetMouse()
    mouse.Icon = "rbxasset://textures/ArrowFarCursor.png"
end)

Note that GetMouse can only be called client side, and therefore you'll either have to run this in a local script or create a RemoteEvent that will change the icon for that player.

Ad
Log in to vote
0
Answered by 4 years ago

If you go into the properties of your click detector, there's an Image tab at the bottom, If you open it, you can put in an ID into the CursorIcon box. (sorry late reply)

Answer this question