So I have gotten crazy man’s DataStore editor but I don’t seem to understand a lot of it.
Here is my current datastore
local ds = game:GetService("DataStoreService")
local BannedDataStore = ds:GetDataStore("BannedDataStore")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local ban1 = Instance.new("BoolValue", leaderstats)
ban1.Name = "ban1"
local data
local success, errormessage = pcall(function()
data = BannedDataStore:GetAsync(player.UserId.."bancheck1")
if data ~= nil then
ban1.Value = data
end
end)
end)
game.Players.PlayerRemoving:Connect(function(player)
local success, errormessage = pcall(function()
BannedDataStore:SetAsync(player.UserId.."bancheck1", player.leaderstats.ban1.Value) -- Save
end)
if success then
print("Data has banned saved")
else
print("error when saving data")
warn(errormessage)
end
end)
So I need to datastore name and datastore scope.
For the name I put “BannedDataStore” and for the scope I have no clue what to put.
Then I need the key so I put “bancheck1”
I don’t know if any of this is correct since I’m not very familiar with a normal datastore and this is my first time using the DataStore Editor…
You don’t have a scope so you don’t need put anything in the scope input field, if you just put the DatastoreName and PlaceID and then the key it should work
your key isn’t bancheck1 it’s player.UserId.."bancheck1" from looking at your data-store script , so you need to use your user id too. So using 996906122bancheck1 should work
Np!, you probably already know this but just as a reminder, when trying to get other players data you need use their user id with bancheck1, assuming you are still using player.UserId.."bancheck1". i was just using yours to make my answer more clear.
Oh and scopes are not required (so you don’t need them for Crazyman’s Data store Editor) , they’re essentially just another way to reference a Data store:
local Datastore = DatastoreService:GetDataStore("BannedDataStore", "Scope")