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

Can you loop a localscript every 10 seconds?

Asked by
jvyss 16
6 years ago

So I'm trying to make my localscript loop to be able to update a players points every few 10 seconds. Is it possible and if so, what do you use?

0
Use while true do, and then do wait(10) and write your script in after the wait, and the end. It means it will wait ten seconds, and will do the script and loop. While true do is an infinite loop. tonyv537 95 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago
while true do
  wait(10)
  --your code
end
1
Easy way to get rep tonyv537 95 — 6y
1
tru Gey4Jesus69 2705 — 6y
Ad
Log in to vote
1
Answered by 6 years ago

You can use this:

while wait(10) do
--your code
end

Answer this question