Im tryna make a weldconstraint attach to the mainpart of this weapon model and the player's uppertorso, but the weld does not get created, i tried spamming it in the code and nothing happens, for some reason it just ignores the Instance.new('WeldConstraint') and I have no idea why.
function mod.CarryWeapon(character,weapon)
local clone = game.ReplicatedStorage.Assets.WeaponModels[weapon]
clone.Parent = character.HumanoidRootPart
clone.Handle.Anchored = true
local weld = Instance.new('WeldConstraint')
weld.Parent = weapon.Handle
weld.Part0 = weapon.Handle
weld.Part1 = character.UpperTorso
local offset = clone.Offset.Value
local rot = clone.Rot.Value
clone:PivotTo(character.PrimaryPart.CFrame * CFrame.new(offset.X,offset.Y,offset.Z) * CFrame.Angles(rot.X,rot.Y,rot.Z))
end
I'm sure im just overlooking something but any help is appreciated