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

Issues with Global Datastore?

Asked by
orcazate 170
4 years ago

I have some errors regarding a global datastore not functioning correctly. I will attach the code I am using to call said value and to set it. HTTP and Roblox Studio API are all good.

Setting code:

1local CreatedServer = TeleportService:ReserveServer(game.PlaceId)
2local Dict = {
3        ServerName = group,
4        PlayerName = plr.Name,
5        RoleName = RoleName,
6        GroupID = groupID,
7    }
8 
9    serverData[CreatedServer] = Dict

Original setup:

01local DataStoreService = game:GetService("DataStoreService")
02local HttpService = game:GetService("HttpService")
03 
04local serverDataStore = DataStoreService:GetDataStore("jreiogehrughwrjghew3kjghe")
05 
06local serverData = {}
07local success, getServerData = pcall(function()
08    return serverDataStore:GetAsync("Main")
09end)
10 
11if success then
12    serverData = getServerData
13end
14 
15local function VerifyServers()
View all 26 lines...

It calls nill. I have it screenshot. It’s kinda hard to read.

photo

Answer this question