How to add command to the commands list when you type "/"

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to add command to the command list when you type “/”

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    seems to be this thing is new on roblox, so google shoowed me no result.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

example of what i mean:
image

2 Likes

It’s a very straightforward process. There’s a section in an article about the chat on the Dev Hub regarding commands called Creating Custom Commands.

TextChatCommand enables that autofill. The called commands will not be displayed in the chat box, and they can be listened to with Triggered signal.

1 Like

I suppose you are using the default chat, it’s quite easy to do that with it.

Step 1) Playtest the game, and look under TextChatService inside the explorer.
Step 2) Copy the TextChatCommands folder and leave the playtest.
Step 3) Paste the TextChatCommands folder back into TextChatService
Step 4) Add a new TextChatCommand Instance into the TextChatCommands folder
Step 5) Edit the attributes of the TextChatCommand instance to what you need

Remember that all functions must be handled on the server as this TextChatCommand instance will only add the command to the chat box, thus not adding any functionality.

Okay, I seem to understand, let me just test it if it works.

I think that is quite the same thing that FellowMeerkat said, but which one is better? Triggered or Chatted? cur rn im using Chatted.

But i think that using Triggered is better, cuz the messages will not appear.

Chatted is part of the legacy service, I think. There are other events you should use to listen and respond to or style messages at different stages. The same article I mentioned includes an excellent flowchart that really helped me understand the flow.

Also, Chatted is a bit bugged at the moment, it sometimes runs twice.

okay, it works, thank you so much

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.