Hi! So, I'm using Datastore2 to try and save the data that I want to be saved but, It does not save
Have a look at the script (I tried using Remote Events and normally and they both did not work).
local datastore2 = require(game.ServerScriptService.MainModule) datastore2.Combine("DATA", "Stage") game.Players.PlayerAdded:Connect(function(player) local stagesStore = datastore2("Stage", player) local function changeStage(amount) game.ReplicatedStorage.EventRemotes.ChangeStage:FireClient(player, amount) end local ls = Instance.new("Folder",player) ls.Name = "leaderstats" local Stage = Instance.new("IntValue") Stage.Name = "Stage" Stage.Value = stagesStore:Get(1) Stage.Parent = ls stagesStore:OnUpdate(changeStage) ls.Parent = player end)
You need a boolValue named SaveInStudio into serverstorage.