I have a Script in ServerScriptService which is my Speaker script. I use it to tell the server when someone joins and whatnot.
Here is the code for my Speaker script:
local players = game:GetService("Players");
local serverScriptService = game:GetService("ServerScriptService");
local chatServiceModule = require(serverScriptService:WaitForChild("ChatServiceRunner").ChatService);
local serverMessageColor = {
Color3.fromRGB(255, 255, 127);
}
local serverSpeaker = chatServiceModule:AddSpeaker("SERVER");
serverSpeaker:SetExtraData("NameColor", serverMessageColor[1]);
serverSpeaker:JoinChannel("ALL");
serverSpeaker:SayMessage("HI");
...
...
...
I looked at ModuleScripts, but they’re only a one-way execute, from what I’ve heard? Also, they don’t accept parameter calls, correct? Anyways, what would be the best way to work the speaker script?
WAIT SCRATCH THAT-- I AM SO SORRY. ModuleScript CAN CALL THE PLAYERADDED FUNCTION. What has to happen first is that the ModuleScript is required by another script.
That is completely my mistake. Once again, my apologies. I’m going to edit my previous posts, so I don’t confuse anybody.