Global Data Help

local DSS = game:GetService("DataStoreService")
local RS = game:GetService("ReplicatedStorage")

local PathRemotes = RS:WaitForChild("Remotes")
local PathItems = RS:WaitForChild("Items")

local GlobalExistsDS = DSS:GetGlobalDataStore("GlobalSave")
GlobalExistsDS:SetAsync("ItemA", 8)
wait(1)
print(GlobalExistsDS:GetAsync("ItemA"))

Why doesn’t this work and how do i get it to work, I want a global data store that can be accessed cross-server to make a serialization system

nothing prints out in console —

Do you have API requests enabled?

Yep all enabled……………………………………………

That’s weird…


Your code totally works.

oh it prints in output not console
how come it’s printing instance after?

It’s probably this:


Also, only server scripts can access data store service. There’s also local and server developer console, so consider changing that if it doesn’t print.

If you’re having issues with it printing in the console, are you checking to make sure you’re not in the “Client” side of the console, but rather the “Server” side? If it works perfectly in the output nonetheless, just take the win and use that perfectly working code.