Hi, I'm just wondering how I would fire a Remote Event on all servers? Like the impossible obby (I think) where you can pay robux to nuke all servers? Thanks.
✓ ANSWER ACCEPTED
Fire a RemoteEvent for all servers?
2 answers
✓ Accepted answer
The somewhat recently-added MessagingService would be useful for this:
https://developer.roblox.com/en-us/api-reference/class/MessagingService
A server Script would listen to events like this:
local messaging_service = game:GetService("MessagingService")
messaging_service:SubscribeAsync("nuke_all_servers", function(extra_data)
print("Received nuke event!")
end)
Another server script could "fire" the nuke event like so (obviously not a useful example):
local messaging_service = game:GetService("MessagingService")
local extra_data = "yada yada"
messaging_service:PublishAsync("nuke_all_servers", extra_data)
This discussion is preserved as it was. New answers, comments, and votes are closed.
