Welded Object appears in random location

I have this function that welds a pickaxe mesh to the player, and as the title and image attached suggests, everytime i play, it spawns in a random location.

I have no idea how to solve this please help

Function:

module.WeldToHand = function(plr : Player, part:BasePart)
	
	local Char = plr.Character or plr.CharacterAdded:Wait()
	
	if part:FindFirstChildOfClass("WeldConstraint") == nil then
		local Weld = Instance.new("WeldConstraint")
		Weld.Parent = part
		Weld.Part0 = part
		
		part.Parent = Char:WaitForChild("Left Arm")
		
		local Hand: BasePart = Char:WaitForChild("Left Arm")
		part.Position = Vector3.new(Hand.Position.X, Hand.Position.Y - 1, Hand.Position.Z - 1)
		Weld.Part1 = Hand
	end
end


image

1 Like

Nvm i solved this by just setting its CFrame

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.