A function to save values to the client

Say I have a script that allows changing keybinds, and I use this script in multiple places, currently there’s no way for me to save ( minus http ) their keybinds and access them at all the places.

This function would save the passed values to a file within the client e.g. :SaveOption( “FileName”, “OptionName”, Value )

There would probably have to be a limit on the size of the file and the amount of files that can be created per game

Hopefully you can understand this, I am literally the worst at explaining things

2 Likes

So you mean something along the lines of SetSetting, but then usable in game instead of being exclusive to plugins.

You would risk other people overwriting that data. Your best bet is to just use place Universes and use DataStores.

Yeah, pretty much, I don’t know why I didn’t just say that :frowning:

That’s what the separate files are for, you’d use a unique name for you specific options

Also, not all the places using my script are mine so I can’t use a Universe

Yes, but what if someone else uses that same name?

Someone could use the same name with a DataStore, so your point is kind of mute

No, DataStores are unique to a game universe. My point is not mute.

Yes but someone else could have inserted my script and be using it alongside theirs which could use the same DataStore as mine

Anyway, the amount of unique names available would make two different developers using the same name very unlikely

If this happened the setting would be per game id, not just variables thrown into a pot luck. Guessing other people’s keys wouldn’t be an issue.

What use cases do you have for this that universes couldn’t be used for?

Well, I have a gun system that has a keybind GUI, however the group using the guns allows people to make their own ‘training’ places that also use the guns so I wanted the keybinds to save to the client so they don’t have to reconfigure per place

I’m a fan of this.
So the only way games can save data right now is through DataStores, is that right?

That or using HTTPService