So I was wondering what would be the best/most efficient way to really implement Keybinds that are editable by the player however I am asking more on the side of loading/handling them.
I can save them and have a few ideas in place on how I want too but that isnt important to include here.
There is no specific methods, it is nothing else than some additional values to save into the datastore.
You can use StringValues for PC keybinds so you can do that when detecting input:
if Enum.KeyCode[Keybind.Value] then
Or you can use a unique ID’s for each possible keybinds (pc and console), then do a dictionnary with a ID = enum.Keybind then when detecting input do that:
local Keybinds = {
Id = Enum.Keycode.A;
Id = Enum.Keycode.B
}
if Enum.KeyCode == Keybinds[Id.Value] then
Personally, the way I handle my implementations is that there can be any number of inputs associated with a single “action”, so I would store them in a dictionary in the datastore if I wanted it to be saved (cause I haven’t gotten around to doing that yet), with the format for one being something like: