Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make helmets that I found in the avatar shop wearable?

Asked by 4 years ago

HI, How can I make a helmet wearable? Can someone help me.

1 answer

Log in to vote
0
Answered by 4 years ago

If you want a part to be touched to wear this hat you found, you can use this script:

01local Part = script.Parent
02local Hat = 1 -- Change this to your hats assetID
03 
04local InsertService = game:GetService("InsertService")
05 
06local function GiveHat(TouchPart)
07   if TouchPart.Parent:FindFirstChild("Humanoid") then
08     InsertService:LoadAsset(Hat).Parent = TouchPart.Parent
09   end
10end
11 
12Part.Touched:Connect(GiveHat)
Ad

Answer this question