I do not know what caused this, but recently the dummy studio clients you can use such as Player1 and Player2, their data has been saving onto the acutal game. This is an issue, because the OrderedDataStores can’t find a player with the userId -1, and crash the script so that any legit player that has a value less than those dummy players does not exist.
So it’s all or nothing correct? There is no way to allow datastores to work in-game and not in studio? I like the separate place idea but I was hoping for something easier.
local RS = game:GetService("RunService")
local DSS = game:GetService("DataStoreService")
local datastore = nil
if RS:IsStudio() then
datastore = DSS:GetOrderedDataStore("studiokey")
else
datastore = DSS:GetOrderedDataStore("gamekey")
end
That’s smart. To fix the current issue i just automatically set all dummy key values to -10, and I already have a system of keytags if i need to reset the data during testing, so your idea should be easy to implement, thank you!