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

Can you weld a whole model to a part?

Okay so I'm trying to weld a model to the torso of the holder but whenever I try, I get an error: "Bad Cast". Can anyone help me?

function equip()
	local humanoid = monk.Parent:FindFirstChild("Humanoid")
	local anim = humanoid:LoadAnimation(animation)
	anim:Play()
	local w = Instance.new("Weld")
	w.Part1 = weapon.Balls
	w.Part2 = holder:FindFirstChild("Torso")
end
weapon.Equipped:connect(equip)

1 answer

✓ Accepted answer

No, you can not weld a whole MODEL to a part, at least not the way you have it written. This is because Welds only work between two Parts.

Also, Welds use Part0 and Part1, not part1 and part2 - that should fix your issue.

does this work? or is weapon.Balls a model?

function equip()
    local humanoid = monk.Parent:FindFirstChild("Humanoid")
    local anim = humanoid:LoadAnimation(animation)
    anim:Play()
    local w = Instance.new("Weld")
    w.Part0 = weapon.Balls
    w.Part1 = holder:FindFirstChild("Torso")
end
weapon.Equipped:connect(equip)

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