Ban System Help

Greetings, developers! I created a chat-based ban system, however, it doesn’t work, and there’s nothing I know of that can fix it.

local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("DABans_jskduejuhasudh84jasdh3")

local Players = game:GetService("Players")
local Reason =

local function fullNameFromPartial(plr, message)
	for i, v in pairs(game.Players:GetPlayers()) do
		if v.Name:lower():sub(1,#message) == message:lower() then
			plr = v
		end
	end
end

game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(Message)
		if string.lower(string.sub(Message[1])) == "/ban" then
			local Player = 
				
				fullNameFromPartial(Player, Message[2])
			
			if Player then
				Reason = Message[3]
				DataStore:SetAsync(Player.UserId, true, Reason)
				Player:Kick(Reason)
			end
		end
	end)
end)

Players.PlayerAdded:Connect(function(playr)
	if DataStore:GetAsync(playr.UserId, true) then
		playr:Kick(Reason)
	end
end)

Any help is appreciated! (Btw, there’s like a million player variables LOL!)

Um can you store a second value?? On the :SetAsync you have the player ID which is the key and then the true which is the value. Is what you stated as “Reason” not a table of ID’s?

I mean u probs could store a table with more the one value not sure but can you store 2 values just like that?

Ah, thanks. I had figured that, but I went with it anyway. I’ll just make a table for it.

Yea try it and it might fix the issue. That is all I can really think about.