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

Kill command not working ( custom admin )?

Asked by 2 years ago
kill = (function(sender, arguments,message, recipient) 
    if sender.AdminRankID.Value >= 1 then
        if arguments[2] then
            local target = findplayer(arguments[1])
            local char = target.Character
            char.Humanoid.Health = 0
        end
    end
end);
0
what does it output ricedealer632 15 — 2y
0
Idk,It odn't give me admin in studio,just in roblox game alexandruboc22 12 — 2y
0
Its just a typo in the script, it seems. Jay123abc2 241 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

It seems like your checking for arguments[2], when arguments[1] is the player. So. If you do /kill [user]. [User] seems to be arguments[1] and arguments[2] will be nil, stopping the script. Try changing if arguments[2] to if arguments[1]

Ad

Answer this question