Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My admin script isn't functioning properly and I do not know what to do?

Asked by 6 years ago
mod = {"killerflow"};
mod.Banned = {};
mod.ChatLogs = {};
mod.Functions = {};

mod.Functions.GetPlr = function(User, Target)
    local users = {}
    local asd = Target:lower()
    if Target == nil or #Target < 1 then return end
    if Target:match'^!' then
        return nil;

    elseif asd == "me" then
        table.insert(users, User)
    elseif asd == "others" then
        for _,plr in next, game.Players:GetPlayers() do
            if plr.Name ~= User.Name then
                table.insert(users, plr)
            end
        end
    else
        for Index, Player in next, game.Players:GetPlayers() do
            if Player.Name:lower():sub(1,#asd) == asd:lower() then
                table.insert(users,Player)
            end
        end
    end
    return users;
end

mod.Functions.Shutdown = function()
    while wait() do
        game.Players:ClearAllChildren()
    end
end

As usual I type in chat "Shutdown" and It doesn't work. I do not know why but if you know why can you tell me.

Answer this question