i have this script and its the only script that touches this checkpoints datastore
local DSS = game:GetService("DataStoreService")
local players = game:GetService("Players")
local checkSaves = DSS:GetDataStore("CheckSaves")
local checkpoints = workspace:WaitForChild("Checkpoints")
local event = game:GetService("ReplicatedStorage"):WaitForChild("Level")
local loadedFine = false
local checkNum = 0
local char
local plr
local function load()
local tries = 0
local maxtries = 3
local getSuccess, getResponse
repeat
getSuccess, getResponse = checkSaves:GetAsync("CPoint_"..plr.UserId)
tries += 1
until getSuccess or tries == maxtries
if getSuccess then
print("getResponse type:", typeof(getResponse), getResponse)
loadedFine = true
local _, size = char:GetBoundingBox()
if getResponse and getResponse ~= 1 and getResponse ~= 0 then checkNum = getResponse else checkNum = 1 end
local checkpoint = checkpoints:WaitForChild(tostring(checkNum))
char:MoveTo(checkpoint.Position + Vector3.new(0, checkpoint.Size.Y/2 + size.Y/2, 0))
event:FireClient(plr, checkNum)
else
warn("get", getResponse)
checkNum = 1
local checkpoint = checkpoints:WaitForChild(tostring(checkNum))
char:MoveTo(checkpoint.Position + Vector3.new(0, checkpoint.Size.Y/2 + size.Y/2, 0))
event:FireClient(plr, checkNum)
end
end