I tried to make a script that would change a player's torso based off of a player's team. But it would not work. First, I placed the script as a local script into the starter player, then I changed the entire script and made it into a regular script that didn't work out, so I took the script and placed it into the server script service, and it still, will not work. Help please. Here's my script.
game.Players.PlayerAdded:Connect(function(player)
local team = player.Team
local char = player.Character or player.CharacterAdded:Wait()
local torso = char.Torso
torso.BrickColor = team.TeamColor
team:GetPropertyChangedSignal("TeamColor"):connect(function()
torso.BrickColor = team.TeamColor
end)
end)

4 comments
is it r6 or r15?
r6
You can just check if it is R6 or R15 by using a function that checks BodyType in Humanoid
I am not looking to change the body type, I am trying to change the torso color. I have the game's settings so it is only R6.