Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My accessories won't be worn properly?

Asked by 4 years ago

Hey, all! I've been working on a project for hours and my only problem is the accessories. I've made about 5 different attempts and they all result in the same way; the accessory falling off the character. I made a simple test button that does the "Humanoid:AddAccessory " function and it doesn't work when I playtest the game or join and actual server. Sometimes the accessory I try to put into the character doesnt even appear near it. It just goes where the handle's position is in workspace. Here is one of my scripts I made:

local player = game.Players.LocalPlayer
local accessory = script.Parent.Hair

script.Parent.MouseButton1Click:Connect(function()
    local newAccessory = accessory:Clone()
    local humanoid = player.Character:WaitForChild("Humanoid")
    humanoid:AddAccessory(newAccessory)
end)

If I copy and paste an accessory into a character while in studio it works, but not while testing/playing

Answer this question