I am trying to fix this problem but I get so confused please help me. If it is possible please Help.
Yes it is possible
Here is an example:
--Server Script local datastore = game:GetService("DataStoreService"):GetDataStore("Bans") game.Players.PlayerAdded:connect(function(plr) local key = "user_" .. plr.UserId local banned = Instance.new("BoolValue", plr) banned.Value = datastore:GetAsync(key) or false banned.Name = "Banned" if banned.Value == true then plr:Kick("You have been banned!") end banned.Changed:connect(function() datastore:SetAsync(key, banned.Value) if banned.Value == true then plr:Kick("You have been banned!") end end) end)
how can the code you posted be made to ban players if they try to use commands?