Is there a way i can make it loop like a function while a variable is true?
Here is a quick example. Sorry if it’s sloppy I’m on my phone.
Boolean example:
example = true
while example == true do — script here end
Value example:
example1 = 1
while example1 == 1 do — script here end
Be aware that I am not a professional scripter. But I'm totally sure this will work.
Use the "while true do" loop. for example:
while true do wait(5) i = true wait(5) i = false end while i = true do print("Five seconds has passed.") end
This script will print "Five seconds has passed" to the output every five seconds. Just change all this a little, and voilà! You made your own game!