Hello, I’m trying to assign a certain player to a special team.
Here’s the team-assigning script that I used:
local SpecialPlayer = game.Teams.SpecialPlayer
game.Players.PlayerAdded:Connect(function(player)
if player.Name == "hctdev" then
player.Team = SpecialPlayer
else
player.Team = Player
end
end)
I also disabled the auto-assignable property for all the teams to prevent the player from being randomly assigned to any team.
When a player with the name “hctdev” joins the game, the script should place them in the “SpecialPlayer” team, however, the player ends up in a neutral team.
I also tried assigning using TeamColor
if player.Name == "hctdev" then
player.TeamColor = BrickColor.new("White")
But it was to no avail.
Is there a way to fix this?