How do i make global or live shop?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear! a shop where person could upload items with custom set quantity, price and name and people can buy it but when uploaded it needs to be global its like roblox game Trade Simulator

  2. What is the issue? Include screenshots / videos if possible! i wanna know how to make it global or atleast have someone to make me closer to making it global

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? yeah i did but cant find solution

1 Like

I never did that, so maybe I could be wrong

But if it’s a global shop to all servers, I think you could do a datastore with a table, that updates time from time in all servers.

The datastore needs to be global, so all players gets the same shop

I don’t know if that’s a good way to do it, because I never did something like that or never saw someone doing it, but, I think it maybe would work

For make a global shop to all servers. Use MessagingService.

local MessagingService = game:GetService("MessagingService")

MessagingService:PublishAsync("Your subject", "Hello everyone !")

MessagingService:SubscribeAsync("Your subject", function(message)
	print(message.data)
end)

I think it should work.

Datastore are good but MessagingService is more easy and faster. (We don’t need to refresh)

1 Like

MemoryStoreService is built for stuff like this.

1 Like

how would i use that for gui? since i never uses messagingservice

When you say global, you could be meaning Server-wide, multi-server, or ALL servers. And each option progressively gets more and more restricted.

  • Server Side only
    For server-wide, itd be a cinch. All you have to do is get a table, either hard-code one or get it from a data store, and then apply Remote Events and Remote Functions to allow users to remove and add to this table. No limits, just a bit of laggy stuff with remote events and functions

  • Multi-server
    This starts to become even bigger with some limitations. Ofc, im talking about Cross Server Messaging with the Messaging Service. This is basically Server Side marketplace but every time a player modifies the server’s market table, it sends a message to ALL servers and mixes the results. Can be VERY hard to implement since you need a function to send the POST, then when POST is received, you need to verify it and merge it with THEIR POST, then RESEND the POST again! These calls will eat up your call limit insanely fast.

  • Every-server
    So, this one might be plausible, but it completely depends on how often you modifiy/get the data stored in the data store or Memory Stores (I forgot they existed). So, what you wanna do is have the server perform a PCALL on the market data store and allow users to do Server Side only modifications. Finally, you can arbitrarily decide when to update this table but GETTTING the data store again. Its super important because what you want to do is merge the tables and POST the merge results.

The biggest problem with all three is the lack of receipts. Without a receipt system, players can find a way to dupe items in a given table.

Good luck!

1 Like

by that i mean if there no servers and player joins everything is saved and still loaded in gui

Use remote events
4.4

Server :

local MessagingService = game:GetService("MessagingService")

local RemoteEvents = game.ReplicatedStorage.RemoteEvents

RemoteEvents.BuyEvent.OnServerEvent:Connect(function(player, message)
	MessagingService:PublishAsync("Message", message) --Send the message
end)

MessagingService:SubscribeAsync("Message", function(message)
	RemoteEvents.SendEvent:FireAllClients(message.Data) --Receive the message
end)

Client :

local RemoteEvents = game.ReplicatedStorage.RemoteEvents

local Frame = script.Parent.Frame
local SendText = script.Parent.SendText

RemoteEvents.SendEvent.OnClientEvent:Connect(function(message) --When someone send a message
	SendText.Visible = true
	SendText.Text = message
	wait(3)
	SendText.Visible = false
end)

Frame.SendButton.MouseButton1Click:Connect(function() --When someone what to send the message
	RemoteEvents.BuyEvent:FireServer(Frame.InputText.Text)
end)

And i think all should work good!

could that work with this

or something that can i upload item and everyone in the game could see it

Sure ! You can use a remote event for fire the items that you bought. And then you can use messaging service to publish it on all servers. If you want to make a message that you bought this item you can use tables. By the way, I don’t understand about “global” shop can you explains me ?

by global shop i mean selected player uploads a item and others see it and can buy and the item is saved if a new server is created

Ohh… So I’ll try to find how to make it. I think you should use DataStore.