Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to kick uppercase names with a script?

I've made a admin but its only able to kick lowercase names can some1 help

local commands = {}

local admins = {
     "Bxl0c";
     "ZebraBeans";
     "CM9x1";
     "pxndahxnnah";

     "Player1"
}

local prefix = ":"

local function findPlayer(name)
	
	for _, player in pairs(game.Players:GetPlayers()) do
		if string.lower(player.Name) == name then
			return player
		end
	end

    return nil

end
	
		

local function isAdmin(player)
	for _, v in pairs(admins) do
		if v == player.Name then
			return true
		end
	end

   return false
end

1 answer

local commands = {}

local admins = {
     "Bxl0c";
     "ZebraBeans";
     "CM9x1";
     "pxndahxnnah";
     "Player1"
}

local prefix = ":"

local function findPlayer(name)
    for _, player in pairs(game.Players:GetPlayers()) do
        if (player.Name:lower() == name:lower()) then
            return player
        end
    end
    return nil
end

local function isAdmin(player)
    for _, admin in pairs(admins) do
        if (player.Name == admin then
            return true
        end
    end
    return false
end

This discussion is preserved as it was. New answers, comments, and votes are closed.