I have a script in my ServerScriptService and its supposed to change the player's avatar but it doesn't work. My Script
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) if player.Team == game.Teams.Child then Character.WaitForChild("Shirt").ShirtTemplate = "rbxassetid://1598177943" Character.WaitForChild("Pants").PantsTemplate = "rbxassetid://1598177943" else end end) end)
Hello, beroglu112!
Try this:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) if player.TeamColor == game.Teams.Child.TeamColor then --Try using the teams color Character:WaitForChild("Shirt").ShirtTemplate = "rbxassetid://1598177943" -- Its not .WaitForChild, it is :WaitForChild Character:WaitForChild("Pants").PantsTemplate = "rbxassetid://1598177943" -- Its not .WaitForChild, it is :WaitForChild else end end) end)
This is a simple, but commom error
Good Luck with your games