Communication between 2 games owned by the same group

  1. What do you want to achieve?
    To send data between 2 different games.

  2. What is the issue?
    My issue it that I have tried messaging service but that doesn’t work as I just read that is from different servers, not games

  3. What solutions have you tried so far?
    I have tried to look over the internet

I know this isn’t a lot of text to help and if you can give me the solution to this that would be great. I would love to use this in a training hub like rp games. This should be real time too

This has to be free as I have no money currently

5 Likes

I’m not sure what you’re goal with this is but, I would say use badges to know when a player has done a certain thing.

1 Like

Badges? I am trying to send data real time to another game owned by the same group

2 Likes

You need to create your own external database.

Also would like to mention, this is unnecessary if the second “game” is just a second place of the original game, which in that case you just use the same database you have.

1 Like

Look into HttpService. It is complex but more than doable.

1 Like

This is like a example.


when the Main game unlocks server, the text should change and the join button should go interactable. I’ve alerady made the script for that.

This is the command block that I need the communication to be (script above is in main game)

1 Like

I’ll try to figure that out. Thanks for helping me to get to it

2 Likes

I’m confused, could you elaborate more?

1 Like

Cross communication between 2 games, when main game sends and the other game should get the request and change stuff, just like Fire server/client

In that case, you need to implement your own external database.

Do you need two individual games for this? Are you unable to create sub-places under the same experience? There’s multiple ways to implement having multiple “games” under the same Experience/Universe. If you’re able to fit the games under the same Universe then you will be able to use MessagingService to communicate between them.

I can try to do that. Chat limit

As mentioned before, set up an external database that accepts HTTP requests and GET and POST data using HttpService on Roblox. If the other game isn’t a whole different game but maybe just a game mode of the main game, consider making it a new place inside your main game, as suggested previously.

1 Like

You could use TeleportService and pass in any data you need as the teleport data.

1 Like

I have tried this, Publish sends, Subscribe doesn’t.

Not starting place script

function Funcs.lockSever(Args)
	local Player = Args[1]
	local Cmd = Args[2]
	if Cmd == "slock" then
		if not sysTable.serverLocked then
			sysTable.serverLocked = true
			game:GetService("MessagingService"):PublishAsync("ServerLock", sysTable.serverLocked)
			essentialsEvent:FireClient(Player,'Hint','Success','The server has been locked for LRs.')
		else
			essentialsEvent:FireClient(Player,'Hint','Error','The server was already locked.')
		end
	elseif Cmd == "unslock" then
		if sysTable.serverLocked then
			sysTable.serverLocked = false
			game:GetService("MessagingService"):PublishAsync("ServerLock", sysTable.serverLocked)
			essentialsEvent:FireClient(Player,'Hint','Success','The server has been unlocked. LRs will start to join soon.')
		else
			essentialsEvent:FireClient(Player,'Hint','Error','The server was already unlocked.')
		end
	end
end

Starting place script

local msgserv = game:GetService("MessagingService")
local http = game:GetService("HttpService")
msgserv:SubscribeAsync("ServerLock", function(message)
	print("daw1")
	if message then
		print("daw2")
		game.ReplicatedStorage.LOCKED:FireClient()
	else
		print("daw3")
		game.ReplicatedStorage.UNLOCKED:FireClient()
	end
end)
-- SYS TABLE 
local sysTable = {
	adminVersion = "5.4.24.20.441A."..tostring(game.PlaceVersion),
	Cache = {
		Username = {},
	},
	Keys = {},
	Debuggers = {
		[17253583] = "TheFurryFish",
	},
	Permissions = {
		gameOwners = {4,{}},
		superAdmins = {3,{}},
		Admins = {2,{}},
		Mods = {1,{}},
		Banned = {},
	},
	chatLogs = {},
	Logs = {},
	errorLogs = {},
	debugLogs = {},
	joinLogs = {},
	donorCache = {},
	donorID = 410700060,
	adminId = 564796604,
	groupConfig = {
		{
			['Group ID'] = 33054377,
			['Group Rank'] = 225,
			['Tolerance Type'] = '>=',
			['Admin Level'] = 4,
		},
		{
			['Group ID'] = 33054377,
			['Group Rank'] = 14,
			['Tolerance Type'] = '>=',
			['Admin Level'] = 2,
		},
		{
			['Group ID'] = 33054377,
			['Group Rank'] = 9,
			['Tolerance Type'] = '>=',
			['Admin Level'] = 1,
		},
	},
	serverLocked = true,
	Prefix = ":",
	actionPrefix = "!",
	kickReason = "You have been kicked from the server.",
	banReason = "You have been banned from the game by,",
	shutdownReason = "This server is shutting down..\nTry joining a different server!",
	serverMessage = "Server Message",
	exploitMessage = "Basic Admin Essentials\nAn error occurred.",
	serverLockReason = "There is a training session going on right now or you are early, please try again soon.",
	donorPerks = true,
	creatorDebugging = true,
	publicCommands = true,
	autoClean = true,
	countingDown = false,
	trelloEnabled = false,
	trelloBoard = nil,
	trelloAppKey = nil,
	trelloToken = nil,
	trelloBanned = {},
	toolLocation = serverStorage,
	privateServers = {},
	systemUpdateInterval = 30,
	dataCategory = "BAE_#$DGF",
	commandConfirmation = false,
	systemColor = Color3.new(31/255,31/255,31/255),
	blacklistedHatIds = {
		["1055299"] = true,
		["140469731"] = true,
	},
	outboundMessages = {},
	localNames = {},
	Changelog = ''
}

I get none of the prints.

Systable is before the publish

EDIT: I did get a error,
image

Solved. Final script,

local PLR = game.Players.PlayerAdded:Wait()

msgserv:SubscribeAsync("ServerLock", function(message)
	print("daw1")
	if message.Data.Lock == true then
		print("daw2")
		game.ReplicatedStorage.LOCKED:FireClient(PLR)
	elseif message.Data.Lock == false then
		print("daw3")
	        game.ReplicatedStorage.UNLOCKED:FireClient(PLR)
	end
end)

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