I'm making an elevator script that teleports players and I was wondering how I would make the player face the directing they were facing before they were teleported. The method I use for teleporting the player looks like this:
p.Character:MoveTo(Vector3.new(-491.607, -102.069, 27.55))
If it helps, this is what my entire script looks like:
Button1.ClickDetector.MouseClick:Connect(function()
ButtonClicked() -- function for closing the door
if script.Parent.InElevator.Value == true then
Button1.ClickDetector.MaxActivationDistance = 0
wait(1.1)
script.Parent.Door.Moving:Play()
wait(7)
script.Parent.InElevator.Value = false
script.Parent.Parent.Parent.Parent.Elevator.ElevatorDoor.ScriptedComponents.Door.Beep:Play()
wait(.8)
p.Character:MoveTo(Vector3.new(-491.607, -102.069, 27.55))
Debounce = false
Button1.ClickDetector.MaxActivationDistance = 4
script.Parent.Parent.Parent.Parent.Elevator.ElevatorDoor.ScriptedComponents.ComingOut.Value = true
wait(2)
script.Parent.Parent.Parent.Parent.Elevator.ElevatorDoor.ScriptedComponents.ComingOut.Value = false
end
end)
Any help is appreciated!

5 comments
I recommend using CFrame as that also includes a part's Orientation (Rotation), so if you teleport them there, their front body will be facing the direction the front of the part is.
So would I use SetPrimaryPartCFrame?
Correct, use it!
Ah, I'm in idiot - I actually tried that but it didn't seem to change anything, it was because I was testing a different elevator than the one I was editing, I'll try it now
*an