Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a data save, I typed below what i've tried?

I've tried local dataStore = game:GetService("DataStoreService") game.Players.PlayerRemoving:Connect(function(player) local success,errormessage = pcall(function() dataStore:SetAsync("oof-"..player.UserId,player.leaderstats.Oofs.Value) dataStore:SetAsync("rebirths-"..player.UserId,player.leaderstats.Rebirths.Value) end) end) But it doesnt seem to work.

1 comment

0

this is hard to read

2 answers

Can you send the full script? I can't really seem to know the real issue here.

1 comment

0

local serverStorage = game:GetService("ServerStorage") local dataStore game:GetService("DataStoreService"):GetDataStore("PlayerDataSave") local player = game.Players.LocalPlayer game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local rebirths = Instance.new("IntValue") rebirths.Name =

This discussion is preserved as it was. New answers, comments, and votes are closed.