Character Customization

Hello, I’m currently making a character customization main menu and I have accessories that I placed in to Replicated Storage. Is there a way to clone it and show on the player or how would I go about this? It’s also running on a local script and I’m not sure if that is affecting it.

This goes in Scripting Support. Please reposition this.

Creations Feedback is only for people who want others to give their work some feedback.

Oops. mb thought I clicked the right sub for this.

Make an array which stores the variables / accessories in the table. You cold clone these items instantly or when you shuffle through the table via gui buttons. Also because its a local script the visuals will only be on the clients screen which is what you want.

For it to show on the player, you will need use a RemoteEvent (Client → Server Communication) and on the server clone the selected accessory and add it to the player.

If you’re talking about a preview, cloning it on the client and adding it to the character will work fine but when they accept the changes you will still need a RemoteEvent.

3 Likes

Yea I figured that part out but the problem I can’t seem to solve is that the hair doesn’t go on to the characters head and it just falls through the workspace. This is the function I currently have:

local function updateHair()
local selectedHair = hairModels[currentHairIndex]
if selectedHair then
currentHair = selectedHair:Clone()
if currentHair:IsA(“Accessory”) then
local humanoid = plr.Character:FindFirstChild(“Humanoid”)
if humanoid then
humanoid:AddAccessory(currentHair)
end
elseif currentHair:FindFirstChild(“Handle”) then
local handle = currentHair.Handle
handle.Parent = plr.Character.Head
handle.CFrame = plr.Character.Head.CFrame * CFrame.new(0, 0.5, 0)
end
end
end

The accessories do appear in the player itself just not on their head.

Set it to the desired position and create a weld/weldconstraint that welds it to the head

1 Like

I’m dumb I was apparently checking the handle of the accessory and the rest of my code was referencing the accessory itself which threw everything off with out errors being thrown.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.