local Admins = ("")
local Prefix = "/" 

for i,v in pairs(Admins) do--Get Some Admins
 game.Players(Admins)(i)).Chatted:connect(function(mag) --idk stuff here that you suold not change
  if mag:lower() == Prefix .. "shutdown" then
   game.Players:ClearAllChildren() -- Removes All The Players
   game.Workspace:ClearAllChildren() --- Removes All Things In Workspace
  end
  
  if mag:lower() == Prefix .. "ff me" then
   Inatance.new {"ForceField". game.Players(Admins(i)).Character)
  end
  
  if mag:lower() == Prefix .. "unff me" then
   while wait() do
   game.Players(Admins(i)).Character.ForceField:Destroy()
   end
  end
  
  if mag:lower() == Prefix .. "freeze me" then
   game.Players(Admins(i)).Character.Torso.Anchored = true
   game.Players(Admins(i)).Character.HumanoidRootPart.Anchored = true
   
  end
 end)
end

These are the commands ive made so far, but what I want to do is to make a command so that if I do !hi it broadcasts a message saying "Hi!".

6 comments

0

Curly brackets aren't for everything. You have to use brackets [ ] or parentheses ( ) in most of the cases that you're currently using curly brackets.

0

For example, where it says pairs{Admins}, it should be pairs(Admins). {} are generally for tables.

0

You can call a function using only curly braces foo { 1, 2 } instead of foo({ 1, 2 }) when the only argument is a table literal, but that's it.

0

Fixed the curky brackets,

0

When you're getting values from tables you still use []. and the admin's table has to have {}

0

So remember it this way, functions use (), when getting values from a table you use [], when using a table you use {}