I have two teams, one team only has a single player and I want a script that will constantly check if that player in the Bright red team has died. I have a little something but I know it is wrong and I do not know where to go, I was hoping someone could hack something up for me, or at least the initial bits.
while true do
wait()
for i, v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == BrickColor.new("Bright red") then
local character = v.Character
if character then
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
end)
end
end
end
player.CharacterAdded:connect(function(character)
end)
end
I KNOW, THE CODE IS WRONG/SLOPPY. I really need help, I want it to essentially isolate
Game.Players.PlayerAdded:connect(function(Player) --When a Player joins
Player.CharacterAdded:connect(function(Character) --When they respawn
Character.Humanoid.Died:connect(function() --When they die
Player.TeamColor = team2.TeamColor --Put them on the 'Aliens' team
end)
end)
end)
but only for a player in the Bright Red team
