I’m attempting to weld a model onto the player’s left hand but it’s being sporadic.
I first found the offset between the hand and the model’s primary part by finding the distance if the left hand was at (0,0,0).
Through this, I copied the the model and use “SetPrimaryPartCFrame” and developed this proximity prompt script.
prompt.Triggered:Connect(function(playerHolder)
local PlrCloneFood = FoodStorage:FindFirstChild("Tomato & Egg Stir Fry"):Clone() --Model I'm trying to weld
PlrCloneFood.Parent = playerHolder.Character --Parents to Player
local offset = CFrame.new(0, -0.602, -1.122)
PlrCloneFood:SetPrimaryPartCFrame(CFrame.new(playerHolder.Character.LeftHand.Position) * offset * CFrame.Angles(math.rad(90), math.rad(180), 0)) --"fixes" positioning
local weld = Instance.new("WeldConstraint") --weld creation to left hand
weld.Name = "Food"
weld.Part0 = playerHolder.Character.LeftHand
weld.Part1 = PlrCloneFood.PrimaryPart
weld.Parent = playerHolder.Character.LeftHand
PlrCloneFood.PrimaryPart.Anchored = false
end)
But this is just resulting in sporadic positions:
https://gyazo.com/9f8c1db7b9b53733386004c77b7a4d79
If I want the CFrame of the model to be relative to the hand just as the first photo shows, how do I fix this? The incorrect positioning is already one issue, but positions being sporadic as the arm swings is another.
If it helps, here’s a file:
Weld.rbxl (93.1 KB)