|
| 26 Jan 2015 05:54 PM |
Ok, so I was trying to make a script that whenever someone dies on a certain team it resets the clock. (timer) Wouldnt it need something to do with GetGhildren |
|
|
| Report Abuse |
|
|
| 26 Jan 2015 06:20 PM |
function resetTimer() --reset the timer here. not sure what you're using as a timer, so I can't do this for you. end
for i,v in ipairs(game.Players:GetPlayers()) do if v.TeamColor == "Black" then --or White, or Industrial Neon Chartreuse or whatever v.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").Died:connect(resetTimer) end) end end
game.Players.PlayerAdded:connect(function(player) if player.TeamColor == "Black" then --or Grey, or Some Muavey Shade of Russet player.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").Died:connect(resetTimer) end) end end)
--Hi! I bet you're a cool person. Have a great life! |
|
|
| Report Abuse |
|
|
| 26 Jan 2015 06:57 PM |
The timer is gonna be at 2:00 and it will countdown and whenever someone dies it will go back to 2:00
|
|
|
| Report Abuse |
|