Did I do anything wrong here
Part doing the messageservice
local toshare = {}
local message = game:GetService("MessagingService")
while true do
if not isgame then break end
if #toshare >= 1 then
task.wait(5)
local status, w = pcall(message:PublishAsync("OperatorSignal", toshare))
if not status then
warn(w)
task.wait(1)
local s, w = pcall(message:PublishAsync("OperatorSignal", toshare))
if s then
toshare = {}
else
warn(w)
end
else
toshare = {}
end
end
end
message:SubscribeAsync("OperatorSignal", function(shared)
for _,id, value in pairs(shared) do
if LocalSignals[id] then
LocalSignals[id]:Fire("Game", table.unpack(value))
end
end
end)
part setting
local id = "Send"
function(...)
toshare[id] = {...}
end