--Player Variables

local plr = game.Players.LocalPlayer
local plrName = plr.Name

if plr.tempStage.Value > #game.Workspace.Checkpoints:GetChildren() then
	--Stage Stuff
	local currentStageNumber = plr.tempStage.Value
	local currentCheckpoint = game.Workspace.Checkpoints:FindFirstChild(tostring(#game.Workspace.Checkpoints:GetChildren()))
	--print(tostring(currentCheckpoint.Name).." -Current Checkpoint")
	local currentCheckpointPos = currentCheckpoint.Position
	local X = currentCheckpointPos.X
	local Y = currentCheckpointPos.Y
	local Z = currentCheckpointPos.Z
	local TPPlace = CFrame.new(X, Y+5, Z)

	plr.Character.Torso.CFrame = TPPlace
else
	--Stage Stuff
	local currentStageNumber = plr.tempStage.Value
	local currentCheckpoint = game.Workspace.Checkpoints:FindFirstChild(tostring(currentStageNumber))
	--print(tostring(currentCheckpoint.Name).." -Current Checkpoint")
	local currentCheckpointPos = currentCheckpoint.Position
	local X = currentCheckpointPos.X
	local Y = currentCheckpointPos.Y
	local Z = currentCheckpointPos.Z
	local TPPlace = CFrame.new(X, Y+5, Z)

	plr.Character.Torso.CFrame = TPPlace
end

