Hello
Using the TextChatService how can I create custom TextChatCommand in addition to the default ones?
Thanks
Hello
Using the TextChatService how can I create custom TextChatCommand in addition to the default ones?
Thanks
change chatversion
to textchatservice.
then use this code in either server or client script
local chat = game:GetService("TextChatService")
local command = Instance.new("TextChatCommand")
command.Parent = chat:WaitForChild("TextChatCommands")
command.PrimaryAlias = "primaryaliasgoeshere"
command.SecondaryAlias = "secondaryaliasgoeshere"
edited to fix errors
remember to put “/” before the alias
example “/command”
updated, if you want to do stuff when it is executed change is to this
local chat = game:GetService("TextChatService")
local command = Instance.new("TextChatCommand")
command.Parent = chat:WaitForChild("TextChatCommands")
command.PrimaryAlias = "/primaryaliasgoeshere"
command.SecondaryAlias = "/secondaryaliasgoeshere"
command.Triggered:Connect(function()
print("code")
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.