How to sync UI to all players?

Hi, I created a shopUI and aswell as a “sold out”-feature, that when a player buys an item, its sold and cant be bought again. my problem now is, that everytime a player opens this UI, it creates a new UI, that means if you buy an item, its sold out, and cant be bought as mentioned, but if you close the UI and open it again, the items hasnt the sold-out-status anymore and can bought again. thanks!

1 Like

You need to update all player UIs when the item is bought (and also add a server side check so that 2 players cannot buy at the same time)

Do you know how to do that?, like any idea of how to implement that? Thanks

You need to keep a reference to all currently shown player widgets, by using a [player]widget map for example