Why isn't this ban script working

So i have a ban script here, but the thing is when my username is not the first player in the table, the ban script doesnt work

the main script

local bindablefunc = game:GetService("ReplicatedStorage").GetBanList

local banlist = {"randomguy", "youngafrocom", "anotherguy"}

bindablefunc.OnInvoke = function(player)
	for i, v in ipairs(banlist) do
		if v == player.Name then
			print("Player is in the ban list.")
			return true
		else
			print("Player is not in the ban list.")
			return false
		end
	end
end

the script that invokes

local bindablefunc = game:GetService("ReplicatedStorage").GetBanList

game.Players.PlayerAdded:Connect(function(player)
	wait(1)
	local checkbanlist = bindablefunc:Invoke(player)
	if checkbanlist == true then
		player:Kick("You are banned from the game")
	end
end)

Because the Invoke only returns one value and it ignores all the next returns, you can use table.find to find a banned person’s name:

bindablefunc.OnInvoke = function(player)
	if table.find(banlist, player.Name) then
		return true
	else
		return false
	end
end