i just dont understand it crashes my game
while true do
print'hello'
end
it shows me some kill script thing but how do i make while true do work without crashing my game?
i just dont understand it crashes my game
while true do
print'hello'
end
it shows me some kill script thing but how do i make while true do work without crashing my game?
A while true do loop will not work without having a wait() in it because it would run way too fast and crash the game. You fix it by adding for example a wait(1):
while true do
wait(1)
print("Hello world!")
end
This works fine, but if you'd want an constant loop you could just you wait() without any numbers. @Crispinus
thanks
you can also use wait(); It's the second fastest wait, the fastest being game["Run Service"].Heartbeat:wait(); which is 60 t/s
You can also do
while wait() do
end
, looks cleaner :)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Please read the wiki before posting. This is very basic and is explained there.