I asked this question before, but I am still stuck on what to do. Here is my code:
game.Players.PlayerAdded:connect(function(Plr)
Plr.CharacterAdded:connect(function(Char)
local Contents = Char:GetChildren()
for _, v in pairs(Contents) -- Remove all existing hats to add new one(s)
if v:IsA("Hat") then
v:remove()
end
end
if Plr.TeamColor == BrickColor.new("Really blue") then -- Check the team Color
local Hat1 = game.ServerStorage:Clone()
Hat1.Parent = Char
elseif Plr.TeamColor == BrickColor.new("Really red") then
local Hat2 = game.ServerStorage:Clone()
Hat2.Parent = Char
end
end)
end)

6 comments
This looks right. Is it a server script?
Yes, it's in Workspace
Why are you cloning ServerStorage? shouldnt you clone one of its children??
I don't know, I'm stuck.
Look up a freemodel morph script.
I'm not looking for a morph script. I want the player's hats to change when they enter the game and choose a team.