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!