So, I Think That What You Are Looking For Is Actually Called Messaging Server.
Roblox Studio Wiki: https://developer.roblox.com/en-us/articles/cross-server-messaging
This Feature Allows You To Communicate Through Each Server That Is Currently Running. If You Want To Announce When A Player Joins The Game In Each Server, It Would Probably Look Like This:
local MessagingService = game:GetService("MessagingService")
local Players = game:GetService("Players")
local Topic = "Announcement"
Players.PlayerAdded:Connect(function(player)
local publishSuccess, publishResult = pcall(function()
local message = player.Name.." Has Joined The Game!"
MessagingService:PublishAsync(Topic, message)
end)
end)
Now, What Comes Next Is The Server Reaction (How The Server Will React To This Data). First, You Need To "Subscribe" All The Servers To Your Message. Here's How (This Code Goes In The Same Script By The Way):
Players.PlayerAdded:Connect(function(player)
local subscribeSuccess, subscribeConnection = pcall(function()
return MessagingService:SubscribeAsync(Topic, function(message)
local Hint = Instance.new("Hint", workspace)
Hint.Text = message.Data
game:GetService("Debris"):AddItem(Hint, 8)
end)
end)
if subscribeSuccess then
player.AncestryChanged:Connect(function()
subscribeConnection:Disconnect()
end)
end
end)
I Hope This Helped You. If You Have Any Doubts, You Can Check On The Link That Is At The Beginning Or Watch Some Tutorials. Good Luck Learning!
1 comment
Thank you. I'll keep that in mind.