Hello, thank you for reading. What I'm trying to do is that after you, Player1, changes your team from Neutral to Red, you'll be automatically respawned/killed.
The other thing is the WarAndPolTime. Basically, it is a timer. The function is that after you change your team, the script will check if you have a IntValue called "WarAndPolTime" in you. If you do, and it's value is not equal to 0 then, the timer will subtract it self until it equals 0.
while true do wait() Respawn() end function Respawn(player) repeat wait() until player.Character local WarAndPolTime = player:findFirstChild("playerstats").slots.WarAndPolTime local character = player.Character; if WarAndPolTime.Value > 0 then repeat WarAndPolTime.Value = WarAndPolTime.Value - 1 until WarAndPolTime.Value == 0 if (character) then if character.Humanoid.Health then character.Humanoid.Health = 0 end end end end