New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

how to replace default mouse icons?

Asked by 1 year 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

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

1 answer

Log in to vote
1
Answered by
ABK2017 392 Moderation Voter
1 year ago
Edited 1 year 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.

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)
0
MouseHoverLeave has a player parameter, should be done on the server ¯\_(?)_/¯ User#19524 106 — 1y
Ad

Answer this question