Why won't messaging service publish async

Hi, I am trying to fire all clients across all servers using messaging service and it isn’t working. If I try to use it in studio it doesn’t do anything inside of the :SubscribeAsync() function, but if I try to use it when I’m playing the game it will just print out a bunch of tables. What should I do to fix all of this?

game.ReplicatedStorage.DropItem.OnServerEvent:Connect(function(plr, itemPrice, itemName, itemId)
	print("recieved serv")
	wait(0.5)
	local message = itemName
	game:GetService("MessagingService"):SubscribeAsync("GlobalAnnouncement", function()
		game.ReplicatedStorage.DropItemGlobal:FireAllClients(itemName)
		print("working")
		local sound = Instance.new("Sound", workspace)
		sound.SoundId = "rbxassetid://317044886"
		sound:Play()
		print("done")
	end)
	game:GetService("MessagingService"):PublishAsync("GlobalDropitem", message)
	print("works")
end)```

These are two different Topics.


1 Like

I just saw that, thank you for helping me!

1 Like

But it still doesn’t go to all servers, what should I do?

Strange, MesagingService is supposed to send to all Servers, Are you sure your game has Access to API Services?

Yes, I am sure that it has access to the Api services.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.