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

Data store error help

I was doing some research and stuff with the Data store, until this error came in my way:

Player3STORE 22:17:15.505 - Place has to be opened with Edit button to access DataStores 22:17:15.506 - Workspace.Script:5: attempt to index global 'ds' (a nil value) 22:17:15.506 - Script 'Workspace.Script', Line 5 22:17:15.506 - stack end 22:17:15.506 - Disconnected event because of exception

Ok, I opened up with that special "Edit" button from the 'Devoleper' tab and started the server, started player, still got this error. I don't know what I need to do to acces the Data Store. In online mode I can't see the prints or the error what it gives me. Here's the code what I've used:

game.Players.PlayerAdded:connect(function (plr)
pl = tostring(plr.Name..'STORE') -- Using global data store so every player has it's own
print(pl) -- Just to check
ds = game:GetService("DataStoreService"):GetDataStore(pl) -- Get the data
j = ds:GetAsync('Weapons') -- Let's see if it has something
print (j) -- Print it out
end)

Code works, but I don't have acces to Data Store in the Studio mode.

1 comment

0

To test DataStore, you should go online on the place itself if Start server & Player doesn't work.

1 answer

✓ Accepted answer

If your script doesn't work in online mode, use a remote error debugger. ROBLOX has made one and it is really helpful as it tells you errors in game.

1 comment

0

It's harder to do it, the script is loaded faster that that GUI so I can't really check the errors but thanks anyways

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