How do I fix attempt to index nil with MoveTo

Hello,
I have this problem with this part of the script where I dont get moved and it says attempt to index nil with moveto can anybody help my?
here is the code:

game.Players.PlayerAdded:Connect(function(player)
local Stagedata
	local success, errormessage = pcall(function()
		Stagedata = storedStageData:GetAsync(player.UserId.."-Stage")
	end)


	if success then
		stage.Value = Stagedata

        local currentstage = checkpointsFolder[Stagedata]
		if currentstage then
			player.Character:MoveTo(currentstage.Position)
		end
	else
		print("there is something wrong with the data")
	end
end)

any help is appreciated!

PlayerAdded fires before the players’ character loads in the workspace so you will want to wait for player.Character to not be nil, look up the player.CharacterAdded event