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.
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.