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 5 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 5 years ago
Edited 5 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 — 5y
0
green is correct. @titaneagle do you even know WHY wait() as a condition works? User#19524 175 — 5y
3
ok titaneagle 0 — 5y
3
thanks titaneagle 0 — 5y
2
ty SloganRightHere 37 — 5y
Ad

Answer this question