Replicating Guis to Clients

Hey there! I just finished making my daily item shop from the excellent tutorial by @rek_kie!
Now, I am a bit uncertain how I should update the shop every time. I am thinking that whenever the shop updates, I should change names and values of shop buying buttons so it will match up with all the shop item tables and replicate it on all the clients.

I have limited experience with hackers and clients and such, but that seems to me like possibly a bad idea. Should I instead change the actual StarterGui, instead of the PlayerGui so whenever a player joins they will everything replicated automatically?

My only issue with this option is that you would have to reset everyone-who-is-already-in-the-server’s character so it could update for them, but maybe there is a better way? What do you think I should do with replicating stuff to the client?

Thanks @colbert2677 for fixing this!

3 Likes

I would recommend that you solve this all on the client side. You should, of course, have a check on the server using a remote event to make sure that a given player is able to buy a given item at a given point in time, but having the shop GUI on the client doesn’t really open up any chances to exploit. After all, you should expect that a hacker would be able to create whatever GUI they want at any given time, so this doesn’t really open up any holes.

Basically, just put a blank shop on the client, and then give the client instructions on how to set it up when the shop refreshes, and put a check on the server to prevent people from buying things that aren’t available to them.

1 Like

Ok thanks, I will definitely do that now!

1 Like