Model rotating the wrong Y axis

Trying to make to model look at the player but it does look at the player but its facing backwards aka 180 degrees wrongly, i’ve tried multiplying the y axis by -1 but it doesn’t work.

local part = script.Parent.PrimaryPart
local charPos = playerCharacter.HumanoidRootPart.Position
			
local lookAtCFrame = CFrame.lookAt(part.Position, charPos)
local modelCFrame = CFrame.fromMatrix(part.Position, lookAtCFrame.XVector, part.CFrame.YVector, lookAtCFrame.ZVector) 
			
modelSCP:SetPrimaryPartCFrame(modelCFrame)

https://gyazo.com/4b08578ec7cb24bfaa9b0d9dffcb27c9

Then rotate it on the Y-axis 180 degrees (which is math.pi in radians).

modelCFrame * CFrame.Angles(0,math.pi,0)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.