Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to replace default mouse icons?

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

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

1 answer

✓ Accepted answer

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.

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)

1 comment

0

MouseHoverLeave has a player parameter, should be done on the server ¯_(?)_/¯

This discussion is preserved as it was. New answers, comments, and votes are closed.