How would I prevent global Variables resetting every time I test the project?

This is complicated. I recently started playing around with plugins and I got into making a plugin that I’d find useful (concerning pathfinding). One of the concepts is that you design your own custom waypoints for your NPC, and I’m having trouble actually saving the waypoint path the user created. I’m handling everything in one script, and this script keeps on resetting everything set before mainly because it’s running all over again once I run the project. Due to this, all the waypoint’s positions are lost and I end up with an empty table which is useless. How would I be able to work around this? So that when I run the game, it keeps all the waypoint data within the table (That I configured by using the plugin)? I’ve tried using _G variables, no difference in that. Maybe datastoring? I’ve been avoiding due to reliablility issues. Help?

I haven’t looked into plugin development very much, but have you tried something along the lines of datastore service? I’m not sure that this is the best option, but it would probably work.

Yeah I was interested in that, but then I was put off by the fact that things may go wrong sometimes (reliablilty), but then again, it might be my only option. I just wanted to see if there were any better ways to do this.

If datastore is used properly, nothing should ever go wrong with it unless roblox itself is having problems, which is pretty uncommon.

IMO, All of these “datastore2” users complain about normal datastores and their lack of reliability simply because they don’t know how to use them properly.

I’ll use Datastores then. Thanks for your suggestions