hello, ackalota !
I think I know why your script isn't working properly!
This can be because when you starts a loop, it only stops when the var comes false(in this case, the var is "wait(0.1)"
this var can't never go to false, so the while will run infinitly
try adding something like debounce!
Tested (and working) example:
local mouseOut = false
Icon.MouseEnter:connect(function()
while mouseOut == false do
wait(0.1)
IconBorder.Rotation = IconBorder.Rotation + 5
end
end)
Icon.MouseLeave:connect(function()
mouseOut = true
wait(0.2)
mouseOut = false
IconBorder.Rotation = 0
end)
Don't forget to properly set the "Icon" and "IconBorder" variables!
-- For more information about Debounce, acess:
http://wiki.roblox.com/index.php?title=Debounce
Good luck with your game!
1 comment
Try adding a debounce to each function and see if that works. If you need help with that, try looking at http://wiki.roblox.com/index.php?title=Debounce