Point script facing wrong direction

Basically, everytime you click it updates where your left arm is pointing.
This depends on where you click. Aka.
You click somewhere and your left arm facing towards it.
But, it faces the wrong direction.

local m = game.Players.LocalPlayer:GetMouse()
local debounce = false
m.Button1Down:connect(function(k)
	
	script.Parent["Left Arm"].Orientation = m.Hit.Position
end)

I would offset the arms shoulder joint instead

--top of script--
local originalOffset = shoulder.C0
-----------------

--put this in the event--
local look = CFrame.new(shoulder.Part0.Position,mouse.Hit.p)
shoulder.C0 = shoulder.Part0.
CFrame:Inverse() * look * originalOffset
-------------------------

This should work but I didnt test it, so I guess put any problems if you need help with them

Where is the shoulder joint in a player?
WAIT NO, I Got it. but it still faces weirdly
Code:

local shoulder = script.Parent.Torso["Right Shoulder"]
local originalOffset = shoulder.C0
local m = game.Players.LocalPlayer:GetMouse()
local debounce = false
m.Button1Down:connect(function(k)

	local look = CFrame.new(shoulder.Part0.Position,m.Hit.p)
	shoulder.C0 = shoulder.Part0.
	CFrame:Inverse() * look * originalOffset
end)

Sorry about that, I should have tested it beforehand

local look = CFrame.new((shoulder.Part0.CFrame*originalOffset).p,workspace.hit.Position)*CFrame.Angles(math.pi/2,0,0) 
shoulder.C0 = shoulder.Part0.CFrame:Inverse() * look * CFrame.Angles(0,math.pi/2,0) 

This works for me

Sorry for being late, it works!

1 Like