How to disable the default cursor from changing when its on a button?

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

2 Likes

Without disabling the “Active” property, I don’t think this is possible unless you use an artificial mouse, but I could be wrong.

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:

{24595D95-DE20-4C70-B2A1-842C36FC8BF3}

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!

so what is your advice here that i do, im a little dumb could you be more clear

ok thank u, can i use a single script / Localscript to multiple buttons?

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