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 /console
local 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)
end
return 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 name
command.aliases = {} --> Command aliases
command.call = function(text)
-- Function called when command is run
end
return command
3. Name it whatever you want and then for the function to kill the player it'd go: