Ciao, I’m trying to make a character creator by making the player choose the dummy hair in a gui.
The dummy is showed in a ViewportFrame. The player has to click the button with the wanted hair.
The script copies the hair and removes the ones that it had before, but it doesn’t put the hair on the head, and idk why.
Script:
local character = script.Parent.Parent.Parent.Card.ViewportFrame.Dummy.Dummy
local Buttons = {
script.Parent.Table.Row1.A,
--There are more ofcourse
}
local Hair = game.ReplicatedStorage.Armadio:FindFirstChild("0").Hair
--Gets where all the hairs are
function Cambia(N)
local Hair = Hair:FindFirstChild(N):Clone() --Searches the right hair
Hair.Name = "Hair"
character:FindFirstChild("Hair"):Destroy() --Removes the hair the dummy had
Hair.Parent = character --Gives the hair
end
Buttons[1].MouseButton1Click:Connect(function()
Cambia(1) --Send which button got clicked
end)
Photo to show where they hair get put whenever they get parented to the dummy:
I tried to search on google but i found nothing.
Thank you a lot
Well, cloning an instance doesn’t reposition it. Just change the position of the hair to be on the dummy already while it’s in replicated storage, instead of having to do it in a script as a fix.
Correct. Just copy the hair into the viewport frame, and position it where the dummy is, then move it back to the replicated storage so you have a properly positioned hair.