So , in my game i changed the mouseicon but the thing is that i need to put the mouse back to normal when the player open a stat menu but i cant find a way to put the mouse back to normal so if u know help me :)
✓ ANSWER ACCEPTED
Can we put the original mouse icon after change ?
1 answer
✓ Accepted answer
To return the mouse to normal, just set the mouse.Icon Property to an empty string ("", not nil)
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
mouse.Icon = ""
Since you want this to occur with a GuiObject, you can use the MouseEnter and MouseLeave events to set the MouseIcon when it enters the Gui and when it Leaves (Frames, Buttons, Labels, etc, but not the literal Gui itself)
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
mouse.Icon = "http://www.roblox.com/asset/?id=0"
script.Parent.MouseEnter:Connect(function()
mouse.Icon = ""
end)
script.Parent.MouseLeave:Connect(function()
mouse.Icon = "http://www.roblox.com/asset/?id=0"
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
