Answered by
7 years ago Edited 7 years ago
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:
02 | Icon.MouseEnter:connect( function () |
03 | while mouseOut = = false do |
05 | IconBorder.Rotation = IconBorder.Rotation + 5 |
09 | Icon.MouseLeave:connect( function () |
13 | IconBorder.Rotation = 0 |
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!