Hi i am making a NEW dif chart obby and i want to know if there is any data saving scripts 4 obbies.
Hi,
I think you just need to have a datastore with a IntValue, and every time the players reaches the next stage the IntValue goes +1
then you make a script when the players joines he spawns on the stage thats equal to the IntValue, So for example you have a part on stage 5 thats named "5" and when the player joines with 5 as saved value he spawns on the part thats called 5
Here an Example of something like I mean:
I made a ModuleScript in ReplicatedStorage:
local module = { [1] = "Stage 1", [2] = "Stage 2" } return module
And this script I did in ServerScriptService:
local Module = require(game.ReplicatedStorage.ModuleScript) game.Players.PlayerAdded:Connect(function(plr) local stats = plr:WaitForChild("leaderstats") local Stage = Module[stats.Stage.Value] if (Stage)then print(Module[stats.Stage.Value]) end end)
So basicly when Player.leaderstats.Stage.Value is 1 then it prints "Stage 1" and when it is 2 it prints "Stage 2"