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

How do I make my game save and load in my Obby?

Asked by 8 years ago

I am trying to make my spawns save in my Obby when I join the game and save at level 1 and load the game and come from that position and load from where you saved how do I do that?

3 answers

Log in to vote
1
Answered by 8 years ago

You would have to use the > DataStoreService

PeasPod did a great tutorial on this, datastore video

He explains it well.

To get your level, you would have to store the values of the players level somewhere in the server.

You could probably do this with a Touched event on the checkpoints, making them check for and getting the player that touched them and changing the value of their level to whatever level checkpoint they are.

If you already have this, then dont worry. Just follow what PeasPod said in the tutorial and you should be having your loading/saving script in no time!

Ad
Log in to vote
0
Answered by 5 years ago

here is the script

local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("GemSaveSystem")

game.Players.PlayerAdded:connect(function(plr)
 local folder = Instance.new("Folder", plr)
 folder.Name = "leaderstats"
 local stage = Instance.new("IntValue", folder)
 stage.Name = "Stage"

 stage.Value = ds1:GetAsync(plr.UserId) or 1
 ds1:SetAsync(plr.UserId, stage.Value)

 stage.Changed:connect(function()
  ds1:SetAsync(plr.UserId, stage.Value)
 end)
end)

put it in workplace

Log in to vote
-1
Answered by
Scout9 17
8 years ago

Data store.

Answer this question