Well i am asking this because i will use it for a military group but the tutorials i only saw are about uniforms. The hat i will use has a few meshparts and parts.
Ok first of all you have to have the hat in your game, so let’s say you have it in your replicated storage for now. So put your hat in the service replicated service, and put the following code in ServerScriptService
local HatName = “Hat” — Name of the hat Local Hat = game.ReplicatedStorage:WaitForChild(HatName) — The hat game.Players.PlayerAdded:Connect(function(Player) — Player event Player.CharacterAdded:Connect(function() — Character Event local char = workspace:WaitForChild(Player.Name) local Clone = Hat:Clone() — Clones the hat Clone.Parent = char end) end)
Lemme know if this works! MAKE SURE that you put the hat in Replicated Storage and put the EXACT name of the hat in the HatName variable. This code will give the player the hat whenever the player joins, when they die, etc.
Closed as off-topic by JesseSong
This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.
Why was this question closed?