I’m trying to weld a simple weapon to the LeftHand of the character, but it doesn’t assign Part0 of WeldConstraint at all. I tried many different ways to assign it, but it just never works. It even prints “LeftHand”, which shows that the character is loaded…
Weapon is a model that has a PrimaryPart. The PrimaryPart is that transparent block, which is a duplicate of the character’s LeftHand
Here’s my code
local Weapon = SS:WaitForChild("Weapons"):WaitForChild(i):Clone()
local WeldTo = Player.Character:WaitForChild("LeftHand")
Weapon.Parent = Player.Character
print("Welding Weapon to "..WeldTo.Name) -- prints "LeftHand"
local Weld = Instance.new("WeldConstraint", Weapon.PrimaryPart)
Weld.Part0 = WeldTo -- Somehow doesn't assign Part0
Weld.Part1 = Weapon.PrimaryPart
Weapon:PivotTo(WeldTo.CFrame)
Here are the properties of the Parts inside Weapon model
have u tried manually setting, does it work when you manually set Part0 to LeftHand of player? (I am trying to understand if this is a coding related or constraint)
It does work, but it doesn’t move the model to the LeftHand cframe. Even if I do it with the command workspace.KrxKenDev.Weapon:SetPrimaryPartCFrame(workspace.KrxKenDev.LeftHand.CFrame)