Hello! This article will show you how to make your own basic chat command system! It is completely beginners friendly but you will need some knowledge about Roblox Studio. As an example, we will make a kick command.
Start by inserting a script into ServerScriptService. Why? Because exploiters are unable to get access to scripts in there. Name the script whatever you want
Open the script. Let's start by detecting when a player is joining.
Now let's check if the player that joined should have access to the chat commands. We'll do that by checking their UserId.
Change the ids to the ids of the players you want to get access to the commands. You can add as many as you want as long as you add an "or" between them.
Now let's detect when the player has chatted.
Now, let's find out what part of the message is the command. And separate it from the rest...
...and also find the player's name.
Now let's see if the command is ":kick" (or the command you want)...
...and check if a player with the name given is in the server.
Finally, let's kick the player.
if PlayerWhoJoined.UserId == 12345678 or 87654321 then
local Command = Message:match(":%w*")
Message = Message:gsub(":%w*", "")
local name = Message:match("%w*_%w*") or
if tostring(Command:lower()) == tostring(":kick") then