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

What is wrong with this team script?

game.Players.PlayerAdded:Connect(function(p) 
	p.CharacterAdded:Connect(function(c) 
		c:WaitForChild('Humanoid').Died:Connect(function() 
			c.Team = game.Teams.Lobby 
		end) 
	end) 
end)

1 answer

✓ Accepted answer

The error is to replace c.Team with p.Team as Team is part of Player, but not a part of the character

game.Players.PlayerAdded:Connect(function(p) 
    p.CharacterAdded:Connect(function(c) 
        c:WaitForChild('Humanoid').Died:Connect(function() 
            c.Team = game.Teams.Lobby 
        end) 
    end) 
end)

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