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

Attaching an accessory to a character, yet it keeps falling off? Ive tried everything?

Asked by 5 years ago
Edited 5 years ago

Ive been working on this for about 2 hours now and I am so confused as to why its not working.

I am trying to literally just attach an Accessory to a character.

I am doing this with a local script because I have to, it attaches the stuff to a dummy inside workspace and everyone shares the same dummy so it must be done client side.

Ive tried welding

if m:IsA("Accessory") then
      m:Clone().Parent = workspace.Survivor
      local NewWeld = Instance.new("Weld")
      NewWeld.Part0 = Character.Head
      NewWeld.Part1 = workspace.Survivor:FindFirstChild("Hat").Handle
end

Which doesnt work

Ive tried flat out parenting the accessory to the character

for j,m in pairs(ReplicatedStorage.Characters[v.Name]:GetChildren()) do
      if workspace.Survivor:FindFirstChild(m.Name) then
            workspace.Survivor:FindFirstChild(m.Name):Destroy()
      end
      m:Clone().Parent = workspace.Survivor
end

This also doesnt work

And Ive also tried the AddAccessory() function inside a humanoid

if m:IsA("Accessory") then
local ClonedAccessory = m:Clone()
                                    workspace.Survivor.Humanoid:AddAccessory(ClonedAccessory)
else
    m:Clone().Parent = workspace.Survivor
end

Which to your surprise also doesnt work.

I have a folder inside ReplicatedStorage with all the characters clothing and hats and stuff.

Let me also mention that I think its an FE problem because all of these work just fine when I press play, but when I run it in server mode, none of them work. But if its an FE problem then how come the shirts and pants still clone to the character?

Anyways I hope someone on here can help me out, this problem is so simple yet so confusing to me. Thanks and have a good day also heres a video that shows whats happening.

https://gyazo.com/baf27b3025f449a3f8c6a33e9569d245

1 answer

Log in to vote
1
Answered by 5 years ago

You didn't parent the weld

0
OOF ScrewDeath 153 — 5y
Ad

Answer this question