Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Intervals to call function?

Asked by 6 years ago

Hi, I'm new to all this, first time learning to code so sorry if the answer is obvious.

Is it possible to call a function for every 300 seconds or something like that?

1 answer

Log in to vote
4
Answered by 6 years ago
Edited 6 years ago

Use a loop.

do something like:

while true do
wait(300)
-- call function
end

Good luck!

0
you shouldn't use a while wait do loop. Do while true do wait(300) green271 635 — 6y
0
green is correct. @titaneagle do you even know WHY wait() as a condition works? User#19524 175 — 6y
3
ok titaneagle 0 — 6y
3
thanks titaneagle 0 — 6y
2
ty SloganRightHere 37 — 6y
Ad

Answer this question