How to make description custom commands?

How to make description anyone custom commands if you send message “/help”?

2 Likes

Can you elaborate further on this?

1 Like
--LocalScript in StarterPlayerScripts
local players = game:GetService("Players")
local tcs = game:GetService("TextChatService")
local player = players.LocalPlayer

tcs.OnIncomingMessage:Connect(function(message:TextChatMessage)
    if not message.TextSource then return end
    local sender = players:GetPlayerByUserId(message.TextSource.UserId)
    if sender then
        if sender.UserId == player.UserId and message.Text == "/help" then
            tcs.TextChannels.RBXGeneral:DisplaySystemMessage("Message here")
        end
    end
end)

Hope this helps! Let me know if you get any errors, because I’m not sure if I did this all right.

1 Like

I would like to replace this standard message with my custom message when entering “/help” I did everything the same as in this specified script but it doesn’t work
2024-01-27

1 Like

You need to tinker with the Roblox core scripts if you want to disable the automatic chat messages.

1 Like

Can you tell me where I can find this?

When you are Studio testing, if you have a dig around in your PlayerScripts or in your character, you should be able to find it. Copy it, edit it, and place it so that it will go into the same place as before.

Unfortunately I can’t find settings chat. In PlayerModule any settings but no TextChatService settings.

It won’t be in settings. It will be in the actual script, there will be code for it.