How do I make positioning or moving a CFrame relative to a part? In my case, I am trying to move a welded part to the player’s left arm -.5 studs(relative to their arm’s position because of walking anims etc)
If you are standing entirely still, it works perfectly. Welds to the player at the wrist, stays attached at the right spot, good job
But if the player is moving, the arms sway and cause the -.5s to just go down, not down the arm.
game.Players.LocalPlayer.Backpack.TransClicker.Equipped:Connect(function()
local part = game.ReplicatedStorage.BRICK:Clone()
part.CanCollide = false
part.Massless = true
local weldConstraint = Instance.new("WeldConstraint")
weldConstraint.Part0 = part
weldConstraint.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
weldConstraint.Parent = part
part.CFrame = game.Players.LocalPlayer.Character["Left Arm"].CFrame
part.Parent = game.Players.LocalPlayer.Character
game.Players.LocalPlayer.Character.TransClicker.Unequipped:Connect(function()
part:Destroy()
end)
end)
this is the code (ignore the mess and absence of variables, it was just to test the weld)