I finally got my checkpoint script working but when you respawn, you're always facing the same direction. Here is my script:
game.Players.PlayerAdded:Connect(function(plr)
local stage = plr:WaitForChild("leaderstats").Stage
plr.CharacterAdded:Connect(function(char)
repeat wait() until plr.Character ~= nil
wait(0.01)
local checkpoint = game.Workspace.Stages:FindFirstChild(stage.Value)
char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(checkpoint.Position + Vector3.new(0,5,0), checkpoint.Position)
char:FindFirstChild("HumanoidRootPart").Orientation = Vector3.new(0,0,0)
wait(0.1)
end)
end)

2 comments
Tysm for the help! I accepted the answer because it worked, the character faces the right way now. The only thing is the camera still faces the wrong direction. If there is a way to fix that please let me know, thanks
Nevermind about what I said above, the camera only faces the wrong way when you play in studio, not the actual game.