As seen in video when typing " / " in the textbox the commands appear, like the “/ChangeTeam” Command, this command is created by a serverscript once the server starts.
It does work like intented, but as soon as I type, as example /C, the command disappears, and you can only see the default commands by roblox, (Auto completion is turned on btw.)
When trying to type another command “reset_exe”, which is created before in studio, it will remain visible while typing letters of the command such as /res…
Is this some kind of bug? If the script, creating the commands is needed lmk.
for i,v in pairs(CommandFunctions) do
local Object = Instance.new("TextChatCommand")
Object.Name = i
Object.PrimaryAlias = v.Alias
if v.SecondaryAlias then
Object.SecondaryAlias = v.SecondaryAlias
end
Object.Parent = TCS.Commands
Object.Triggered:Connect(function(originTextSource, unfilteredText)
task.spawn(v.Function, originTextSource, unfilteredText)
end)
end
And this a example Table
local CommandFunctions = {
["View Items"] = {
Alias = "/ViewItems",
SecondaryAlias = nil,
Function = function(originTextSource, unfilteredText)
local Player = Players:GetPlayerByUserId(originTextSource.UserId)
if not Dev(Player) then return end
for _, child in pairs(Tools) do
print(child.Name)
end
end,
}
}