Basically I'm trying to make a banscript, but whenever I hit play on Roblox Studio it tells me the follwing:
DataStore request was added to queue. If request queue fills, further requests will be dropped.
And any Datastore changes I try to make using scripts do not do anything. (I am only saving boolean values so it's not too much data!) BanHandler
local DataStoreService = game:GetService("DataStoreService")
local BanDataStore = DataStoreService:GetDataStore("BanDataStore")
script.Parent.Ban.Event:Connect(function(Player : Player)
BanDataStore:SetAsync(Player.UserId, true)
print(tostring(Player.UserId).." has been banned!")
Player:Kick("Banned.")
end)
script.Parent.Unban.Event:Connect(function(Player : Player)
BanDataStore:SetAsync(Player.UserId, false)
end)
DatastoreHandler -- DatastoreHandler
game.Players.PlayerAdded:Connect(function(player)
local DatastoreService = game:GetService("DataStoreService")
local BanDataStore = DatastoreService:GetDataStore("BanDataStore")
BanDataStore:SetAsync(2528182795, false)
local UserId = player.UserId
local result = BanDataStore:GetAsync(UserId)
if result then
player:Kick("You have been banned from this game!")
end
if not result then
BanDataStore:SetAsync(UserId, false)
end
end)
Is this because you are setting your own account to be unbanned?
BanDataStore:SetAsync(2528182795, false)
Try commenting this out and see if it works.