I'm making admin commands and don't want them showing in chat, I have modified the "message sender" script but it doesn't work.
Edits on line 15 - 20
-- // FileName: MessageSender.lua
-- // Written by: Xsitsu
-- // Description: Module to centralize sending message functionality.
local module = {}
--////////////////////////////// Include
--//////////////////////////////////////
local modulesFolder = script.Parent
--////////////////////////////// Methods
--//////////////////////////////////////
local methods = {}
methods.__index = methods
function methods:SendMessage(message, toChannel)
local prefix = "/"
local splitString = message:split(prefix)
if splitString[1] == prefix then
else
self.SayMessageRequest:FireServer(message, toChannel)
end
end
function methods:RegisterSayMessageFunction(func)
self.SayMessageRequest = func
end
--///////////////////////// Constructors
--//////////////////////////////////////
function module.new()
local obj = setmetatable({}, methods)
obj.SayMessageRequest = nil
return obj
end
return module.new()
Thanks!

5 comments
nice OOP
what?
Nice object oriented programming. Lua isn't an object oriented programming language so Roblox gave us ModuleScripts to kind of fake it, and you're using a ModuleScript.
Ok, how can I fix my issue though
lol modules aren't oop or oop replacement modules are literally just containers that return any 1 value you can make them OOP tho, also roblox programming is less redundant when you use the OOP paradigm so it's a little more common sense.