Doesn't send data on Client

Hey guys, I am trying to make a Global announcement system, but it doesn’t send the data.SenderName blah blah blah to the client on ANY other server that is not the server, where the globalanc messageservice was sent from.

ReplicatedStorage.Events.ItemShop.ActualGlobalAnc.OnServerEvent:Connect(function(player, message)
-- code
	local data = {
		SenderName = tonumber(player.UserId),
		Message = tostring(filteredText),
	}

	pcall(function()
		MessagingService:PublishAsync("GlobalAnc", data)
	end)
end)

MessagingService:SubscribeAsync("GlobalAnc", function(message)
	local data = message.Data
	if not data then return end
	for i,v in pairs(game.Players:GetPlayers()) do
		ReplicatedStorage.Events.ItemShop.ActualGlobalAnc:FireClient(v, data.SenderName, data.Message)
	end
end)

Are you using studio to test messaging service? As far as I know, messaging service doesn’t actually function in studio. I believe its essentially isolated.

1 Like

It is tested in the actual game.

try printing message.Data to see if its structured correctly

1 Like

it doesn’t even print anything.

do you even fire the ActualGlobalAnc RemoteEvent to the server?

1 Like

yeah. like i said before, it gets handled in the server where the GlobalAnc was published, but not on others. (on others-processes the fireclient, but doesnt get the Message or SenderName)

Nevermind, this was resolved like 5 minutes ago.

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