i want the arm to move towards the mouse position
the issue is that nothing really happens it wont move even tho it prints “Moved”
I have tried looking for solutions on the devforum but none helped. Also when i tried printing out the position it was crazy values like 9545, 5765 -7234. Even tho the real position is something like 20, 25, 50
Here is the script:
armOffset = char.UpperTorso.CFrame:Inverse() * char.RightUpperArm.CFrame armWeld = Instance.new("Weld") armWeld.Part0 = char.UpperTorso armWeld.Part1 = char.RightUpperArm armWeld.Parent = char RunService.Heartbeat:Connect(function() if stop == false then if armWeld == nil then armWeld = Instance.new("Weld") armWeld.Part0 = char.UpperTorso armWeld.Part1 = char.RightUpperArm armWeld.Parent = char end local cframe = CFrame.new(char.UpperTorso.Position, Vector3.new(Posm.X,Posm.Y,char.RightUpperArm.Position.Z)) * CFrame.Angles(math.pi/2, 0, 0) armWeld.C0 = armOffset * char.UpperTorso.CFrame:toObjectSpace(cframe) print("Moved") else if armWeld then armWeld:Destroy() end end end)
The script is a regular script and the positions come from a localscript.