How would i change a players hair in script?

I am trying to change the player hair, I can change the shirt and face but I have no idea.

2 Likes

This requires the use of Humanoid:AddAccessory() method. More information found here:
https://developer.roblox.com/api-reference/function/Humanoid/AddAccessory

Addendum
To remove the previous hair, it takes an additional step. In order to identify whether the accessory is a hair, check its attachments. If it has a HairAttachment, it is definitely a hair accessory.

Otherwise, if you’re looking for application on custom characters, it’s more complicated(read: difficult).

4 Likes

As Operatik said AddAccessory() is the way to go when adding accessories like hair. But if you want to change your hair you need to locate the accessory get it’s type so you know if it’s hair and change the mesh id inside of the Handle. (unless the handle is somehow a MeshPart)

1 Like