The_Techist
New Coder
Hello all, I have a fairly simple question. I am new to LUA and don't yet understand exactly how for loops work in this language yet. I have a code that I have integrated into my workspace that changes the gravity after 10 seconds as seen here:
This works, but I need to turn it into an infinite loop if possible where every ten seconds it will cycle between 500 gravity and 1 gravity. Can someone tell me how I would edit this code to become an infinitely looping code?
Code:
script.Parent.Gravity = 500
wait (10)
script.Parent.Gravity = 1
This works, but I need to turn it into an infinite loop if possible where every ten seconds it will cycle between 500 gravity and 1 gravity. Can someone tell me how I would edit this code to become an infinitely looping code?