I have a server chat module that works in Studio, but doesn’t work in-game as the title states. It looks like the module isn’t being loaded at all, since it isn’t printing any of the “loading” statements in the live place. What should I be doing to make sure it works?
I’m using the Aero Game Framework, so here’s what the code for the module looks like:
local function Run(ChatService)
if not game:GetService("RunService"):IsServer() then print("NOT THE SERVER") return end
if (not _G.Aero) then
local to = 0
repeat
to += 1
wait(1)
print("could not find aero...")
until _G.Aero ~= nil or to == 10
if not _G.Aero then print("COULD NOT LOAD GACHA SPEAKER :(") return end
local aero = _G.Aero
local gachaSpeaker = ChatService:AddSpeaker("[GachaCorp]")
gachaSpeaker:JoinChannel("All")
-- gachaSpeaker:SendMessage()
-- code for speaker here, it connects to one of the Services in the AGF
print("LOADED GACHA SPEAKER")
end
end
return Run