MessagingService Not Working?

I have found that my 1 year old game’s global messaging system is now failing with no errors?

I have even wrapped it in a pcall and just nothing is happening.

local MessagingService = game:GetService("MessagingService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GlobalEvent = game.ReplicatedStorage.Global

-- Publish messages periodically (Testing)
task.spawn(function()
	while true do
		local success, err = pcall(function()
			MessagingService:PublishAsync("GlobalMessage", "HI")
		end)
		if not success then
			warn("Failed to publish message:", err)
		end

		print("Published message")
		task.wait(5)
	end
end)




local success, err = pcall(function()
	MessagingService:SubscribeAsync("GlobalMessage", function(message)
		print("Received message:", message)
		GlobalEvent:FireAllClients(message)
	end)
end)
if not success then
	warn("Failed to subscribe to topic:", err)
end

Hi, Is this still an issue? We haven’t noticed any issues with the MessagingService recently. If you’re still experiencing the issue please let us know your place/universe ID for investigation. Thanks.

2 Likes

Hey,

Thank you for the response. I have found that messaging service does not work on testing in Roblox studio, but rather will work in the game.

Thanks!

OP is right. MessagingService has a problem when team testing only.