I’m having issue with my code, and I was wondering, I’m doing something wrong in my code.
I’m receiving an error at
local Server = ServerStore:GetAsync("ABC")[1]
local ServerStore = game:GetService("DataStoreService"):GetDataStore("Servers")
while true do
local Instancex = ""
local Playersx = 0
if ServerStore:GetAsync("ABC") == {} then
game.ReplicatedStorage.TESTPLACE.ServerExists.Value = false
end
if ServerStore:GetAsync("ABC") ~= {} then
local Server = ServerStore:GetAsync("ABC")[1]
if Server then
Playersx = Server[2]
Instancex = Server[1]
game.ReplicatedStorage.TESTPLACE.ServerExists.Value = true
else
game.ReplicatedStorage.TESTPLACE.ServerExists.Value = false
end
end
game.ReplicatedStorage.TESTPLACE.Value = Playersx
game.ReplicatedStorage.TESTPLACE.Instance.Value = Instancex
if Playersx < 1 then
game.ReplicatedStorage.TESTPLACE.ServerExists.Value = false
end
wait(2.5)
end