In the variable name? table.
I mostly see people (on the forum) calling it a Dictionary so the reader knows what they are talking about without seeing the code.
You can also call it “Settings”, if the player can change the Keybinds.
These are both dictionaries and functionally the same. The only benefit of putting it in square brackets is that it allows you to set the key to pretty much anything except nil, booleans and floats, whereas without you are limited to 1 word strings.
However you can’t compare the two tables by using == or ~= because their memory locations are different and are seen as different objects. Instead you will need to compare each element in the dictionary one by one. Hope this helps!
to be 100% sure we need to see deasembler of code but im pretty sure in --!optimize 2 there is 0 differance
Using [“”] is required if you are using specific characters that otherwise would not work aswell if you are making a hash table like:
local ins = Instance.new("Part")
local hashTable:{[Instance]:string} = {
[ins] = "Message"
}
No there is no difference other than you can use just about any character when u use a string enclosed in square brackets as opposed to a single word that can’t start with a non-alphabet character.
If you have such question on future best guess is setting --!strict mode
Also not really correct becouse it should’ve been: [string]:string instead
{string} is equal to {[number]:string} btw
You call one by it’s a key or by it’s place like print(ToolBarKeybindsTable[“Joint”]).
The other you call by it’s place only like print(ToolBarKeybindsTable[6]).