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

How do I change a Player's Team?

So I'm trying to make a script that will team a player if he is in my group.

Here's what I'm trying.

function onEntered(player)
	wait(1)
	if player:IsInGroup(1240748)then
	player.TeamColor = BrickColor.new("Really Black")
	end
end
game.Players.PlayerAdded:connect(onEntered)

The Team's Color is "Really Black".

Please help!

1 comment

0

It should be Really black (letter b in black lowercase). Lua is case-sensitive.

1 answer

✓ Accepted answer
function onEntered(player)
    wait(1)
    if player:IsInGroup(1240748)then
    player.TeamColor = BrickColor.new("Really black") --Lua is case sensitive like how MastaJames said. Spell the BrickColor right.
    end
end
game.Players.PlayerAdded:connect(onEntered)

BrickColor Codes and spellings.

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