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

How to set custom mouse cursor for ImageButtons?

Asked by 5 years ago

In my game I have a start GUI, what I'm trying to do it change the mouse cursor to a custom one when the cursor hovers over the ImageButton. However I have been unable to find any resources to do this.

1 answer

Log in to vote
0
Answered by
Alphexus 498 Moderation Voter
5 years ago

Here this will help:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

local hovered = false
imagelabel.MouseEnter:Connect(function()
    if not hover then
        mouse.Icon = [Image]
    else
        mouse.Icon = [Image]

end)

This is just an example. If you just copy and paste this script, it will not work. I think you have an idea on how to make one now. Put "SOLVED" in yor title and please accept this answer if it has helped you. Thanks and keep on scripting!

0
The "imagelabel" can be anything. I meant for it to be "imageButton". Alphexus 498 — 5y
Ad

Answer this question