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

How to change Mouse Hover Icon?

Asked by 3 years ago

I am using a Custom Mouse but when I hover my mouse onto a TextButton, it defaults back to normal. I want to know how to change it without changing the .png file in the games files. This is my script that I'm using.

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = 'rbxassetid://6701678581'

1 answer

Log in to vote
0
Answered by 3 years ago

Then put a LocalScript into the Button and write the same, but just into a Hover event

local b = script.Parent

b.MouseEnter:Connect(function()

        local mouse = game.Players.LocalPlayer:GetMouse()
    mouse.Icon = 'rbxassetid://6701678581'

end)

b.MouseLeave:Connect(function()

        local mouse = game.Players.LocalPlayer:GetMouse()
    mouse.Icon = 'rbxassetid://6701678581'

end)

I think that’s should be okay ????

1
Roblox temporarily disables that while hovering a button so that doesn't work Filip100012 58 — 3y
Ad

Answer this question