How would I save a GUI & its image labels visibility using Data Stores?

Hello, I have an in-game shop that allows players to buy trails. Upon buying a trail, an image label with a text button will appear on the Trails menu. How would I save its visibility?

1 Like

Save the name of the trail the player bought, later you can get it by using GetAsync function, and then you can make a remote event to the client, which makes the gui visible again

If you don’t know how to save the name, check the Data store tutorial on the DevHub

Using the remote event with the client would make it exploitable, as the remote event on the local script will be interacting with the script, which I don’t want to happen

You can make a string-boolean reply system between server to client, but you should use a remote event for client - server

I know this data store that I’m looking for is pretty much doable without a local script, there are very few things that actually require a local script.
But what I’m looking for is actually saving the visibility values of the GUI & image labels with Data Stores. I’ve made a few scripts for it, but no script worked, so I ended up deleting those scripts.

1 Like

Note: That you cannot save an instance to a data store, you can only save UTF-8 characters

What are UTF-8 Characters?
They are tables, strings,numbers and table of strings
You can save:

  • Dictionaries
  • Array

Now you should use a remote event to the server, so the server can save the visible values of your gui, however you cannot save from the client

I know exploiting is a bad thing, but you can make it ecrypted, there are no games without getting hacked, you cannot just break it, if you make anti-cheat for one hacking software, they will make another software, if you make for that one too, they will make one more, at a time, your game will be so laggy because of those many anti-cheat scripts and functions and loops, and you will end up getting a player drop, because of the fps drop down in the game

Just make basic anti-cheat, and then make it save

you can create a stringvalue that has the id of the image then save the image value if the stringvalue has a value

i would usually make a stringvalue then make the name of the string the id

If you change the value from client-side, the server cannot see it, and you cannot save it
Also if you save in string value, if the server shuts down, the data will be gone

oh yeah then here just make an anticheat that detects if the player tried exploiting the save remote, then just use a remote for client → server

What you even mean?

You can even fake fire a remote event from server or from client, so it makes no sense, even if you tried to put remote event at one side (Client or server), you can just have a security key passed from memory service, and then verifying it, if the request made is real

Any data added in memory service can max last upto 45 days, so you have to keep changing if you saved in memory store service, but you can actually save in Data store service

Yes, I’m aware, that’s why I want to have something on the script that will have the same meaning as each image label so I can save its visibility for players when they buy a certain trail

Also why are you soo worried about making anti-cheat for trial shop, if its a pvp game, then hacking will making it unfair, so you have to worry about it, what happens if they trial can be easily got? I mean you don’t really have to worry as much as a pvp game, if your thinking about a basic store

It’s not a PvP game, the trails also require quite some grind to obtain