StarJ3M
(StarJ3M)
1
I made a weld script to weld a tool to the StarterCharacter of the Player, but the weld never gets added to the RightArm.
There’s no errors.
script.Parent.Equipped:Connect(function()
local weld = Instance.new("Weld")
weld.Parent = script.Parent.Parent:WaitForChild("Right Arm")
weld.C0 = script.Parent.Parent:WaitForChild("Right Arm")
weld.C1 = script.Parent:WaitForChild("Handle")
end)
Game Link:
(13) plox - Roblox
You never set the Part1 or the Part0 of the weld.
script.Parent.Equipped:Connect(function()
local weld = Instance.new("Weld")
weld.Part0 = script.Parent.Parent:WaitForChild("Right Arm")
weld.Part1 = script.Parent:WaitForChild("Handle")
weld.C0 = script.Parent.Parent:WaitForChild("Right Arm")
weld.C1 = script.Parent:WaitForChild("Handle")
weld.Parent = script.Parent.Parent:WaitForChild("Right Arm")
end)
1 Like
And use WeldConstraint instead of Weld since Weld is deprecated:
WeldConstraint | Roblox Creator Documentation
2 Likes