How can I make a player spawn with a helmet that I found in the avatar shop?
✓ ANSWER ACCEPTED
How to make only team helmets and how to make them wearable?
1 answer
✓ Accepted answer
I already answered your other question, you probably didn't see it but now I know exactly what your looking for.
local Hat = 42 -- put helmet assetID / hat ID here
local Players = game:GetService("Players")
local InsertService = game:GetService("InsertService")
local function AddHelmet(Player)
Player.CharacterAdded:Connect(function(Character)
wait()
local Team = Player.Team
local TeamColor = Player.TeamColor
-- you can find the team TWO ways, using the name, or the color! Change them as you want.
if Team.Name == "TEAM NAME" or TeamColor == Color3.fromRGB(0,0,0) then
InsertService:LoadAsset(Hat):GetChildren()[1].Parent = Character
end
end)
end
Players.PlayerAdded:Connect(AddHelmet)
This discussion is preserved as it was. New answers, comments, and votes are closed.

17 comments
Thank you so much.
Where should I put this?
serverscriptservice.
It doesn't work
I put everything in a script under serverscriptservice; I change the ID and I put inside the script my team name but it doesn't work
any errors?
Idk, maybe
copy and paste the code again, just in-case.
It says that (AddHelmet) is wrong.
Oh, hangon.
try now.
Did you fix it?
i fixed it, well attempted to, re copy and paste it
Ok I'll try again.
Ok, it work, thank u for your time.
No problem, enjoy scripting!
I'm trying to script a hair remover.