So, I have an admin script, here is a command.
Commands.print = function(Sender,Arguments)
local Message = table.concat(Arguments," ")
print("From " ..Sender.Name..":\n"..Message)
end
I want to make it to where I can kill the player, any help?
So, I have an admin script, here is a command.
Commands.print = function(Sender,Arguments)
local Message = table.concat(Arguments," ")
print("From " ..Sender.Name..":\n"..Message)
end
I want to make it to where I can kill the player, any help?
just :FindFirstChild if there is a player or not, or if you're feeling fancy use a partial match like how I did below. you can use this to have any form of partial match to find a player as well, so you can use it as a template
function PartialMatch(bruhmium)
if (not bruhmium) then return nil end;
for i, v in pairs(game.Players:GetPlayers()) do
if (v.Name:lower():match(bruhmium:lower()) then
return v;
end
end
end
Commands.PartialMatchFunction(Sender,Arguments)
--We only need the first argument unless you want to modify this to kill a group of people
local Argument = PartialMatch(Arguments[1]);
if (not Argument) then return false end;
--do your stuff to kill the player found
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
you would probably need a way to get the character then use BreakJoints() or setting the humanoid health to 0
Thats what I am trying to do....
there is a wiki article on how to make chat commands, hope this helps in some way https://developer.roblox.com/en-us/recipes/Add-Chat-Commands
I don't wanna change my whole admin script, LOL.