this code wont work!
local a = game:GetService(‘Players’).PlayerAdded
local b = a:WaitForChild(“Humanoid”)
while wait() do
if b.Died then
b.Team = “Zombie”
end
end
this code wont work!
local a = game:GetService(‘Players’).PlayerAdded
local b = a:WaitForChild(“Humanoid”)
while wait() do
if b.Died then
b.Team = “Zombie”
end
end
I would do something like
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char.Humanoid.Died:Connect(function()
plr.Team = game.Teams.Zombie
end)
end)
end)
it worked! i just needed to change the code on line four to game.Teams.Zombie and it worked!