I just want a short code that i will add to my long script, ive obviously tried things on my self but i havent figured it out for some reason, not ai either.
you know when your mouse button is on a button right? then the points of the game is gone when the player knows they are on a button
If you’re talking about a click detector, one way you could do this is by changing the CursorIcon property to the default mouse icon:
And if you’re talking about a GuiButton, you could change the cursor every time the mouse enters it and then change it back to the last saved cursor icon when the mouse leaves:
local mouse = game.Players.LocalPlayer:GetMouse()
local icon = mouse.Icon
script.Parent.MouseEnter:Connect(function() mouse.Icon = "CUSTOM_ICON_ID" end)
script.Parent.MouseLeave:Connect(function() mouse.Icon = icon end)
I thought this would be the most reliable way to do it as opposed to some other gimmicky method but let me know if this helps!
use a localscript as it is for ui, you can paste this localscript into any gui button as long as you change the "CUSTOM_ICON_ID" part of the script to your id