i would like to do that when the player joins server 2, server 1 sends player data to server 2, and also a message to it.
I tried looking for videos and these are the scripts that most people gave
sever1
local Msg = game:GetService("MessagingService")
game.Players.PlayerAdded:Connect(function(plr)
Msg:PublishAsync("PlayerJoined", plr.Name.."hi")
end)
sever2
local Msg = game:GetService("MessagingService")
Msg:SubscribeAsync("PlayerJoined",function(msg)
print(msg)
end)
Yes, you should use MessagingService. What’s the issue?
the problem is that it doesn’t work
Server 1 is being loaded, but maybe Server 2, when the player leaves, Server 2 shuts down, so the server instance isn’t there anymore.
how is your server1 and server2 code implemented? i mean like how do you know they’re server 1 and server 2 and just not both server1?
i don’t understand can you explain it if you can pls?
Find4U2Go
(Warp)
October 20, 2023, 9:28pm
#10
If it is a ReservedServer, like a private server, you can fire teleport to private server with teleportData. You can receive it in the new server.
If both places are supposed to be accessible to anyone, use DataStoreService. If the player leaves, save the data you want to transmit, and in the new server, it will attempt to access it.
1 Like
Thanks, if i have any problems i ask them to you?
Find4U2Go
(Warp)
October 20, 2023, 9:36pm
#12
yeah, sure, if you have any problems, let me know
1 Like