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

storing or loading from data store not working, why?

Asked by 4 years ago

i am trying to save player data to data store using a script i found and modified The original script is from this website

I modified it so that it would store three values Experience as IntValue Rank as StringValue Bucks as IntValue

before i modified the script it worked but now it doesn't work anymore, i wonder have i referenced the data i want to store correctly?

my modified script is beloew

001-- Data Storage
002local DataStoreService = game:GetService("DataStoreService")
003 
004local playerData = DataStoreService:GetDataStore("PlayerData")
005 
006 
007 
008local function onPlayerJoin(player)  -- Runs when players join
009 
010    local leaderstats = Instance.new("Folder"--Sets up leaderstats folder
011 
012    leaderstats.Name = "leaderstats"
013 
014    leaderstats.Parent = player
015 
View all 109 lines...
0
On line 71, you are supposed to insert the value inside the table like this:. table.insert() Soban06 410 — 4y

Answer this question