I created a time script for my round based game. the Time()
function has a wait() in it, so I wanted to place it in a new thread so I wouldn’t have to wait for the time to end to start the round.
The Time() script:
function Time(seconds)
local TotalSeconds = game:GetService('ReplicatedStorage').TotalSeconds
repeat
TotalSeconds.Value = seconds
seconds = seconds - 1
wait(1)
until seconds < 0
end
Now the spawn()
wrap looks like this: spawn(Time(20))
I think it might be the way I wrapped the function, but I don’t know.
If you can figure it out, I would appreciate it!