How to make a hat accessory?

Hi, I’ve been watching tutorials and guides on how to make a hat accessory and put it on my head but I can’t find the right video an make this work and be updated.

Does anyone have any sample script or tutorial on how to make hats accessories that is updated?

I don’t know much but I know that accessories are made out of meshes

like a hat giver or something or just ordinary accessories

Since you posted it in the scripting channel, I am going to assume you want to do it by scripting. What you can do is make your hat, put it in the ReplicatedStorage, add a server script to the ServerScriptStorage and write this,

local hat = game.ReplicatedStorage. --your hat name

game.Players.PlayedAdded:Connect(function(plr)
    hat.Parent = plr.Character
end)