Hide commands with BAE

Hey! So I’m developing a game called ‘Hanami Restaurant’ and I need help autohiding commands. I haven’t tried anything because I don’t know what to do for it or where to start. The game uses Basic Admin Essentials for admin and basically what I want is I want whenever a command that starts with : is typing in chat it to be hidden for everyone except the sender. Then text underneath it saying “This command is hidden”. If anyone could help me achieve this I would greatly appreciate it! I want it to hide in chat and above the players heads too.

1 Like

something like this should help u solve the problem

I will try it out! Thank you for the resource!

1 Like

This did not work because I realized I wanted it to disappear on both the chat and the chat bubble!

do u want a command bar for mobile? if yes, thats possible.

1 Like

hi! i tried to do it and i have system BUT im unable to hide bubble chat… :frowning:

local MarketplaceService = game:GetService("MarketplaceService")
local TCS = game:GetService("TextChatService")
local Players = game:GetService("Players")
local CWC = TCS.ChatWindowConfiguration

TCS.OnChatWindowAdded = function(message: TextChatMessage)
	local properties = CWC:DeriveNewMessageProperties() :: ChatWindowMessageProperties
	local textsource = message.TextSource :: TextSource
	if not textsource then return end
	
	local divided = message.Text:sub(0, 1)
	
	
	if divided == ":" then
		if Players:FindFirstChild(textsource.Name) == Players.LocalPlayer then
			properties.Text = `{message.Text} <i>(This command hidden)</i>`
			return properties
		else
			properties.Text = "	 "
			properties.PrefixText = "	 "
			properties.TextSize = 0
			return properties
		end
	end
	
	return nil -- if default message
end
2 Likes

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