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

How do I to change a persons team?

I want them to get their team changed and then get killed so they spawn at another teams spawn. This is what ive tried. Its not working. And where should i be placing the script. In an intermission script or on its own?

game.Players.LocalPlayers.TeamColor = BrickColor.new("Lime Green")
game.Players.LocalPlayers.Head:remove

I dont whats wrong with but of them and the output didnt really help.

1 answer

The correct code would be

game.Players.LocalPlayer.TeamColor = BrickColor.new("Lime Green");
game.Players.LocalPlayer.Character.Head:Destroy();

The only things wrong were the use of and s at the end of LocalPlayer and not referencing the Character before trying to reference the head. Destroy() is a much better alternative to Remove().

2 comments

0

Thanks but the Change Team script doesn't work. It always puts it on Neutral. Thanks for answering back though!

0

If I'm not mistaken, there is a boolean value in the player that sets if their team is neutral.

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