So I am using this script:
function lookAt(chr,target)
if chr.PrimaryPart then
local chrPos=chr.PrimaryPart.Position
local tPos=target.Position
local modTPos=Vector3.new(tPos.X,chrPos.Y,tPos.X)
local newCF=CFrame.new(chrPos,modTPos)
chr:SetPrimaryPartCFrame(newCF)
end
end
Prompt.Triggered:Connect(function(Player)
local Char = Player.Character
lookAt(Char, script.Parent.Parent)
end)
but every time I run the code it makes me face one way: