Hi im trying to Repeatly Fire a event but when i use this code it only fires it for a second and doesnt do anything after
while true do wait()
ReallyBigExplosion:FireAllClients()
wait(55)
break
end```
Hi im trying to Repeatly Fire a event but when i use this code it only fires it for a second and doesnt do anything after
while true do wait()
ReallyBigExplosion:FireAllClients()
wait(55)
break
end```
remove the break and you are fine, it breaks the loop
No i want it to stop after a few seconds.
Well if you want it to stop after a few seconds you can do this. You can randomly stop the code by chance.
You can do this:
local StartTime = os.time()
while true do
wait()
ReallyBigExplosion:FireAllClients()
if os.time() - StartTime >= 55 then -- If 55 seconds have passed
break
end
end
Yeah basically it will only fire once because it is waiting for the wait(55) to finish.