I have always wondered how servers can send stuff between them. For example Miners Haven with their shout feature that allows people to talk in different server. I am not asking for a script I am just wondering how this works
This is done by using datastores.
In one server, a function is run to set the value of a datastore.
Then, on the other, there is an OnUpdate function which is triggered once the value is set.
For Example:
Server 1:
local DataStore = game:GetService("DataStoreService"):GetDataStore("CrossChat") -- get the datastore function MyEpicChatFunction(message,player) message = game.Chat:FilterStringForBroadcast(message, player) -- remember to filter! DataStore:SetAsync("Chat",message) -- Sets the "Chat" value to the message end
Server 2:
local DataStore = game:GetService("DataStoreService"):GetDataStore("CrossChat") -- get the datastore local MyConnection = DataStore:OnUpdate("Chat",function(message) -- set up the function local hint = Instance.new("Hint",workspace) -- create a hint hint.Text = message -- set the text of the hint wait(2) -- Wait for two seconds hint:Destroy() -- Remove the hint end)
This is a crude example, but would probably work.