Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to insert a wait into this script?

I have this script here that changes you to the orange team once you die. It works but I want to disable it for a few seconds at the beginning of each game. When I add a wait though it permanently disables the script.

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c:WaitForChild("Humanoid").Died:connect(function()
p.TeamColor = BrickColor.new("Bright orange") --Or what ever team color it is.
end)
end)
end)

Thanks

1 answer

✓ Accepted answer

I think this would work (I am kinda guessing...) -

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
wait(1) -- Or how ever you like it to wait for
c:WaitForChild("Humanoid").Died:connect(function()
p.TeamColor = BrickColor.new("Bright orange") --Or what ever team color it is.
end)
end)
end)

I

This discussion is preserved as it was. New answers, comments, and votes are closed.