I’m working on an obby game and in my respawn function I have the code below that teleports the new character to the checkpoint. Is there a better way to make the character face the same direction the checkpoint is facing?
-- Teleport player to checkpoint and face them the same direction the checkpoint is facing --
character.Head.CFrame = (checkpoint.CFrame * CFrame.new(0, 4, 0)) * CFrame.Angles(
math.rad(checkpoint.Orientation.X),
math.rad(checkpoint.Orientation.Y + 90), -- Positive 90 for the forward direction
math.rad(checkpoint.Orientation.Z)
);