Best method to store changing local Player data

I’m working on a spot the difference type game with a classic style–

I’ve tried debugging this myself but it’s been a pain:

I am tracking how many times a Player has interacted with a Prompt, and when it reaches 5, it opens a gate to a new area (and resetting this counter of 5 back to 0 for the next area). I’m not using a RemoteEvent with my Datastore because unfortunately haven’t successfully been able to utilize one yet so instead it’s tracking it through a table locally.

The Issue: After a few levels unlocked, one of the gates won’t open when the 5 Prompts are activated, causing the player to have to rejoin, and recollect the Prompts to continue.

I watched a friend play through 10 Levels, and it happened to them twice.

What is the best way to store local Player data like a player interacting with Prompts without losing data which seems to be the issue here, or how can I effectively use a RemoteEvent/what am I doing wrong that a RemoteEvent never works for me?

Thanks!

– maybe unimportant, but I’m an AI scripter however have been working with roblox scripting logic for like 12+ years so have a decent understanding of what’s going on :slight_smile:

EDIT: Honestly it just seems like I need to learn RemoteEvents and make them work for me; the way I’m storing data seems really unreliable on the clientside.

1 Like

Be nice to see a video of this. There are actually many ways. What are you doing now?
Do the gates stay open? Is this per player? Are the prompts all someplace within a folder on the workspace? Do you have a script?

You can take a look if you’d like: 🔎 Find The Difference BETA - Roblox

But basically

Workspace > Findables > Map1, Map2, Map3, etc. which each contain a set of Prompts
Workspace > AreaGates > Area1, Area2, Area3, etc (made to go invisible/walkthrough locally)

When Player activates all Prompts under MapX Folder, Open the correlating AreaX gate for that player (locally).

When a Player rejoins, if they activate a Prompt in MapX folder, it makes all the previous AreaX gates open. It’s a sloppy process, I’m reworking all of it lol

Checkpoints stored on serverside so I’m trying to switch over everything to mostly serverside and just minimize my local scripts because I’m running into huge issues.

Still running into issues firing this RemoteEvent properly though, will keep working on it.

This sounds like a datastore… The data would save as they go and load when joining… then tested to see the count of where they are for a gates open function. A count of 15 would mean they are on the 4th room. (counting starting area) Could even port them to that level on logging in. In fact didn’t that have a level playerstat… Could show that figured by the count too.

Is this a one player game? Nope says 18 … you’ll have your work cut out for you here but, this is all possible. I’d go right to learning databases. You’ll only need 1 stat … count.

Okay honestly that’s pretty smart to just count up total Prompts and make sure previous prompts can’t be activated on rejoin based off of their Checkpoint level (which is already a serverside datastore).

Currently I have the local table resetting every 5 prompts.

Counting seems much more straightforward, and maybe each gate correlated to the total count rather than their present interactions, thanks!

1 Like

Well that is convenient, 90% of that is already done.

So basically I’m finding I’m still going to need to figure out how to fire these RemoteEvents properly because interacting with a ProximityPrompt is a local event (it seems), so yeah. I’ve converted everything to a PromptCount and updated Gates to open at 5, 10, 15, etc. which is MUCH simpler than what I had going-- just need to figure out how to properly track these Prompts from client → serverside using RemoteEvents to update the stat i’d assume

Edit: I scrapped my revisions and went back to my old system with the only bug being that for some reason the 5th Gate has a persistent issue of not opening after 5 prompts resulting in player having to rejoin + recollect the 5th level.

I just can’t get those RemoteEvents to fire properly, and GPT is on my last nerve tonight, wont even get me some output debugging on the RemoteEvent not firing, so I can’t see what’s going on…

Any suggestions to continue with my current setup, or some solid advice on getting my RemoteEvents to fire? Seems I need them regardless because of activating a Prompt being a local event.