The Problem
I’m scripting my own admin commands and while trying to implement a feature where using a specific prefix (‘@’) the command wouldn’t show up in chat, I ran into a barrier: the way of accomplishing this prevents private messages.
The Code
local ServerScriptService = game:GetService("ServerScriptService");
local Commands = require(ServerScriptService.AdminHandler.Commands);
local Settings = require(ServerScriptService.AdminHandler.Settings);
local function ProcessCommand(Speaker, Message, ChannelName)
if Message:sub(1, 1) == Settings.SilentPrefix then
return true;
end;
return false;
end;
local function RunChatModule(ChatService)
ChatService:RegisterProcessCommandsFunction("SilentCommand", ProcessCommand);
end;
return RunChatModule;
The Solution?
Does anyone have any clue how to solve this? I’m really hoping I won’t have to implement whispering myself. What happens is when I click on a player’s name in chat, and type in my message to whisper to them, it just comes out as /w (the player’s name) (message). I’m stumped, and I’m not sure if there is any way to fix this.