Commands are part of the client, and easy to create. There are currently 7 built-in commands in the system that work effectively.
Example (/console)
-- Author: @Jumpathy-- Name: developerConsole.lua-- Description: Ability to open developer console via /consolelocal starterGui = game:GetService("StarterGui")local command = {}command.name ="console"command.aliases = {"c"}command.call=function()local devConsoleVisible = game.StarterGui:GetCore("DevConsoleVisible") game:GetService("StarterGui"):SetCore("DevConsoleVisible",not devConsoleVisible)endreturn command
Creating our own
Let's get started on creating our own command that resets the player!
Add a module and name it whatever you want in the 'Commands' folder.
Open it and set something like the following code:
local command = {}command.name =...--> Command namecommand.aliases = {} --> Command aliasescommand.call=function(text) -- Function called when command is runendreturn command
3. Name it whatever you want and then for the function to kill the player it'd go: