Can you show an example of the accessory in-studio + send a video of what it looks like when the script is run??
https://developer.roblox.com/en-us/api-reference/function/Humanoid/AddAccessory
Might be worth reading up on AddAccessory(), the BasePart instance named “Handle” inside the Accessory instance requires an Attachment instance inside of it matching the name of an Attachment instance inside the humanoid’s parent (character model), if these conditions are satisfied the BasePart instance is welded to the Attachment instance of the character model in such a way that both Attachment instances occupy the same space.
Could you try this
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent1")
local Character = nil
local style = nil
local humanoid = nil
local char = workspace:WaitForChild("CharSelectDummy")
Event.OnServerEvent:Connect(function(player, styleType)
Character = player.Character or player.CharacterAdded:Wait()
humanoid = char:WaitForChild("Humanoid")
if styleType[1] == "Hair" then
-- Hair types
if (styleType[2] == "1") then
style = player.PlayerGui.CharCreationScreen.HairScrollingFrame.ViewportFrame1.Hair:Clone()
style.Parent = game.ReplicatedStorage
humanoid:AddAccessory(style)
end
end
end)
1 Like