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

how to replace default mouse icons?

Asked by 6 years ago

I know that you can replace the mouse icon but does anyone know the one used for a click detector or how I could find it? this is my script so far but i need it's decal ID

1local mouse = game.Players.LocalPlayer:GetMouse()
2if mouse.Icon == 'rbxassetid://(click detector ID here)' then
3    mouse.Icon = 'rbxassetid://163023520'
4end

1 answer

Log in to vote
1
Answered by
ABK2017 406 Moderation Voter
6 years ago
Edited 6 years ago

You could use the MouseHoverEvent...Keep in mind this is a local script/client side so you’d have to add a remote event to communicate with the server.

01local clickDetector = LOCATION_OF_CLICKDETECTOR
02local icon = "rbxassetid://ASSET_ID"
03 
04clickDetector.MouseHoverEnter:Connect(function(player)
05    local mouse = player:GetMouse()
06    mouse.Icon = icon
07end)
08 
09clickDetector.MouseHoverLeave:Connect(function(player)
10    local mouse = player:GetMouse()
12end)
0
MouseHoverLeave has a player parameter, should be done on the server ¯\_(?)_/¯ User#19524 175 — 6y
Ad

Answer this question