Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Weld not being created?

I created a weld upon the character dying, and it seems as if I make Part1 nil, it is created, but when Part1 is defined as a part, the weld disappears. How am I supposed to fix this?

local partA = script.Parent.Torso

script.Parent.Humanoid.Died:connect(function()

    wait(0.2)   

    local Neck = Instance.new("Weld")
    Neck.Name = "Neck"
    Neck.Part0 = partA
    Neck.Part1 = script.Parent.Head
    Neck.C0 = CFrame.new(0, 1.5, 0)
    Neck.C1 = CFrame.new()
    Neck.Parent = partA

end)

1 comment

0

When the humanoid is dead it runs a loop to destroy every weld and joints in the player's descendants. I'm thinking your problem is your weld is being quickly destroy right when it gets created in the torso

1 answer

Try re-naming your variable for the Weld, any time I name it something other than Weld it doesent work for me.

local Weld = Instance.new("Weld")

This discussion is preserved as it was. New answers, comments, and votes are closed.