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 3 years ago

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

1 answer

Log in to vote
0
Answered by 3 years ago

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

local Part = script.Parent
local Hat = 1 -- Change this to your hats assetID

local InsertService = game:GetService("InsertService")

local function GiveHat(TouchPart)
   if TouchPart.Parent:FindFirstChild("Humanoid") then
     InsertService:LoadAsset(Hat).Parent = TouchPart.Parent
   end
end

Part.Touched:Connect(GiveHat)
Ad

Answer this question