TextChatCommands not fully showing in the chat

When typing in special characters such as “/#?!” etc. commands will show up in the text chat, however, if the command continues like “/Respawn”, it won’t show up in the TextChat.

These commands are created my the Sever with a script.

I had the problem before already, I thought it was some kind of bug, so I decided to not use TextChatCommands, but it seems still to be present.

1 Like

The script that creates the commands

local Prefix	="/"
for CommandName, CommandTable in pairs(commandModule) do
	local TCCommand			=Instance.new("TextChatCommand", CommandsFolder)
	TCCommand.PrimaryAlias	="/" .. Prefix .. CommandName
	TCCommand.SecondaryAlias="/" .. CommandName
	TCCommand.Name			=CommandName
	TCCommand.Triggered:Connect(function(originTextSource: TextSource, unfilteredText: string)
		local Player = Players:GetPlayerByUserId(originTextSource.UserId)
		if Player then
			local hasPermission = false

			for _, permission in ipairs(CommandTable.Permission) do
				if AdminModule["Is" .. permission](Player.UserId) then
					hasPermission = true
					break
				end
			end

			if hasPermission then
				local args = {}
				for arg in string.gmatch(unfilteredText, "%S+") do
					table.insert(args, arg)
				end
				table.remove(args, 1)
				CommandTable.Function(Player, unpack(args))
			else
				print(Player.Name .. " does not have permission to execute " .. CommandName)
			end
		end
	end)
end

You’re adding the same prefix twice to the alias

Yeah, I know, however that’s not the problem, as I also tested it without it.

There’s still literally 2 prefixes here, / and !

No, the commands with /! are created by Adonis, they aren’t mine.
I only tried executing commands created by my own script, (Also some of the commands in adonis aren’t showing also)