Click for accessory using Click-detector

Intro

Hi everyone, so I’ve looked around and I couldn’t find how to use a Click-detector to wear/equip a accessory such as a hat, hair. Everything I have seen is you walk on / touch it and it equips which isn’t what I want.

Example

The scripting support category is for asking for help, not for everyone else to write code for you. Please post your attempt first rather than just showing us what you want.

Ok so basically make a part in workspace and give it a click detector,

Then you will need a copy of “accessory” in replicated storage like hair or a hat or anything,

Then do:

-- Put a script inside the part
script.Parent.ClickDetector.MouseClick:Connect(function(player) 
   local hairClone = game.ReplicatedStorage.Hair:Clone()
   hairClone.Parent = game.Workspace:FindFirstChild(player.Name)

   -- If you wanna add anything additional here you can
end)

Something like that or similar should do it

14 Likes

This is scripting support, he doesn’t need to write a script if he doesn’t know how to…

Also btw, close the thread or mark it solved so others don’t start commenting if it worked already

2 Likes