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

What code would be most efficient to create checkpoints, leaderstats, and autosave for an obby?

Asked by 4 years ago
Edited 4 years ago

Because I am a complete beginner, I have mostly been watching youtube vids lol and i found that teams are not very efficient, so then I tried xuefei's vid, but that didn't work for me, so I settled on Halted's yt vid, and that worked for me with checkpoints and leaderstats, but it didn't save stages. Please help! Edit: I recently found a script that saves the stage in the leaderstats, but it still spawns me at the beginning.

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)

would there be any way to fix this?

0
code block Pupppy44 671 — 4y
0
explain please? Fauxriii 8 — 4y
0
I think I have a solution. Sit tight... MuffinZMan_YT 20 — 4y
0
yay Fauxriii 8 — 4y

Answer this question