Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I remove player accessoires but keep their hair?

I want the script just to remove their hats but keep the hair.

3 comments

0

They are all accessories, so you'll have to go find a way to check the ID and see if it's hair or a hat.

0

How am I suppose to do that? I've never done anything like that before.

0

I don't think it's possible.

1 answer

✓ Accepted answer

This can be done with HumanoidDescriptions.

-- access the character and humanoid
local character = workspace:WaitForChild("username")
local humanoid = character:WaitForChild("Humanoid")

-- access the previously existing HumanoidDescription
local HumanoidDescription = humanoid.HumanoidDescription

-- set the value of every non-hair accessory to an empty string
HumanoidDescription.BackAccessory = ""
HumanoidDescription.FaceAccessory = ""
HumanoidDescription.FrontAccessory = ""
HumanoidDescription.HatAccessory = ""
HumanoidDescription.NeckAccessory = ""
HumanoidDescription.ShouldersAccessory = ""
HumanoidDescription.WaistAccessory = ""

-- reapply the humanoid description
humanoid:ApplyDescription(HumanoidDescription)

1 comment

1

It works! Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.