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

How to put a model on player hea with a GUI ?

Hi! I'm working on a game where i need to make a wigs gui, i know the gui interaction but i don't know how to put the model on the player head when pressing the buttons. Thank You!

1 comment

0

@Jessesong Please provide relevant details to the question, that video has nothing to do with the question.

1 answer

If you are using accessory objects (recommended for hats and wigs), there is a simple solution:

Humanoid:AddAccessory, it allows you to find the character's humanoid and automatically attaches the hat/hair to the player's head without any need to worry about welding or CFraming. I also want to note that due to stupid and unknown reasons this will not even work in a local script if you were having this in some sort of character customization place where you could relax with FE support, you would have to use remote events and apply it via a server script.

If you are using actual models, I would do it this way:

Set the model's primary part to a part that will be cancollided to false and positioned in the players head that is welded to the rest of the other model's parts in the way you want the whole thing to look. Then when you want to put it on the player's head, you clone it from replicated or server storage and set the CFrame of the model's primarypart to the CFrame of the player's head and weld it.

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