Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I use data persistence with levels?

Asked by 10 years ago

I have tried 2 different ways and both ways i got a error message

httpGet https://api.roblox.com/gametransactions/getpendingtransactions/?PlaceId=162851162&PlayerId=27579743 failed. Trying again. Error: Forbidden. Elapsed time: 2.27604

I have tried

game.Players.PlayerAdded:connect(function(player)
    if player:WaitForDataReady() then
        player:SaveNumber('demonlvl', demlvl)
    end  
end)

I also have tried it as saving then i tried

local RbxUtility = LoadLibrary("RbxUtility")
player:SaveString('data', RbxUtility.EncodeJSON(playerdata))

Answer this question