Hello Developers of ROBLOX,
I am currently trying to make a script that changes a player’s team.
The problem is, that anything I try (even things that should work) doesn’t work, it doesn’t even print the error.
I already searched the Developer Forum and every “working” method didn’t work.
This is the script:
game.ReplicatedStorage.TeamChange.OnServerEvent:Connect(function(player)
player.Team = game.Teams.ExampleTeam
print("Player's Team Changed!")
end)
I don’t like using the “game.Teams.TeamName”, what I use is BrickColor. Assign a team to a brickColor and do like:
game.ReplicatedStorage.TeamChange.OnServerEvent:Connect(function(player)
player.TeamColor = BrickColor.new("White")
print("Player's Team Changed!")
end