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

Can I Change Image Button Mouse Icon?

Asked by 6 years ago
Edited 6 years ago

I changed my mouse icon with mouse.icon = "someassetidhere", obviously, but I noticed that when I hover over things like image buttons and click detectors it changes to the default mouse or click detector mouse, removing my custom mouse icon. I was wondering how to change this or if there's a property I'm unaware of. Thanks.

0
Why not just disable the mouse completely? If you just change the icon to nothing, it’ll be invisible but will still be there. User#20279 0 — 6y
0
It's kind of necessary for the game. fuffieboy 17 — 6y
0
Well, if it MUST stay active, I know a probably-working-but-inefficient way to make the mouse not appear on buttons and stuff. Make a GUI frame, make it active in the properties, make it invisible, make it cover the whole screen, and make the zindex really high. That might work. User#20279 0 — 6y
0
its a big oooooooooooof fuffieboy 17 — 6y
View all comments (2 more)
0
Also I'm not trying to make it invisible lol fuffieboy 17 — 6y
0
Oh, you edited your question. Okay, now I need to rethink about your question... User#20279 0 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

The reason may be because you are not formatting it correctly.

game.Players.PlayerAdded:Connect(function(player)
    player:GetMouse().Icon = rbxassetid://<assetidhere>
end

I hope this helped!

0
I think he's trying to say he doesn't want the default mouse icon to show up when hovering over ClickDetectors or buttons, just only the icon fuffie set up. User#20279 0 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

All Mouse objects have a property called Icon. Icon is what the mouse pointer looks like on a player's screen. It is loaded using "www.roblox.com/asset?id=". Here's an example:

script.Parent.MouseEnter:Connect(function()
    local mouse = game.Players.LocalPlayer:GetMouse()
    mouse.Icon = "http://www.roblox.com/asset?id=163023520"
end)

You can use that to change the pointer icon if you like. Please note that it must be a Local Script in order for the icon to change.

0
Same will work for ClickDetectors ;) DeceptiveCaster 3761 — 6y
0
Hmm, it changes the mouse icon after I move my mouse away from the button. It still is default mouse when hovered over. fuffieboy 17 — 6y

Answer this question