So I'm making a refresh button by using a ImageLabel. I've gotten the main code down to refresh a player and spawn them back in their previous spot. My problem is that my ImageLabel has a "Refresh" icon and I want it to rotate when the player moves their mouse over the ImageLabel.
My GUI and Hierarchy of it: GUI Hierarchy
Here's my code and I think I'm not using something right:
--LOCAL SCRIPT INSIDE A IMAGELABEL
function Entered()
while true do
wait(0.1)
script.Parent.Rotation = game.StarterGui.Main.Image.Rotation + 1
end
end
function Leave()
script.Parent.Rotation = 0
end
script.Parent.MouseEnter:connect(Entered)
script.Parent.MouseEnter:connect(Leave)

1 comment
Your Hierarchy does not match "game.StarterGui.Main.Image".