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
