for i=1,#target do
game.Players.target[i].Character:BreakJoints()
end
Is incorrect, if "target" contains "FakeNameHereSoNoStalkers" then the run code would be:
game.Players.target.1.Character:BreakJoints()
Which is completely incorrect.
c = game.Players:GetChildren()
Never use "Players:GetChildren()", it is not guaranteed to return only players.
Instead use:
c = Game.Players:GetPlayers()
if msg:lower()=="me" then
table.insert(people, source)
return people
Here you add the player's name in the list "people", where you in the other places adds the player object.
Fixed code:
local Admins = {"FakeNameHereSoNoStalkers"}
function Kill(Players)
for i,Player in ipairs(Players) do
if Player.Character then
Player.Character:BreakJoints()
end
end
end
function IsAdmin(Player)
for i,AdminName in ipairs(Admins) do
if Player.Name:lower() == AdminName:lower() then return true end
end
return false
end
function GetPlayers(Player,Msg)
local Targets = {}
local Players = Game.Players:GetPlayers()
if Msg:lower() == "me" then
Targets = { Player }
elseif Msg:lower() == "all" then
Targets = Players
elseif Msg:lower() == "others" then
for i,Plr in ipairs(Players) do
if Plr ~= Player then
table.insert(Targets,Plr)
end
end
else
for i,Plr in ipairs(Players) do
if Plr.Name:lower():sub(1,Msg:len()) == Msg then
table.insert(Targets,Plr)
end
end
end
return Targets
end
Game.Players.PlayerAdded:connect(function(Player)
if IsAdmin(Player) then
Player.Chatted:connect(function(Msg)
if Msg:lower():sub(1,6) == ":kill " then
Kill(GetPlayers(Player,Msg:sub(7)))
end
end)
end
end)
Answer from ZombieSpy on Stack OverflowVideos
Who was the first person to create admin commands in Roblox?
The first Roblox user to create admin commands was known as "Person299." He created a command script in 2008, and it was the most used script in Roblox. However, the actual commands he made are no longer active.
What does Roblox Endorsed mean?
Endorsed models, images, meshes, audio, video, and plugins found in the Toolkit library are items that Roblox reviewed and approved for safe and reliable use. Each endorsed item was thoroughly tested to be bug-free, virus-free, error-free, lag-free, and more.
Can other players hack the admin commands?
Some admins are worried that another player could hack their commands and take over the game, but that shouldn't be a concern because it's almost impossible. Another player can only use the codes if the original creator provides them with access to the commands list, whether by script or game library options.
Is there any admin command scripts out there? Possibly free?