Tables or plain variables?

Title; is it cleaner to use a table with variables or just using the variables alone (example below)
table

local Debounces = {
	["Crouching"] = false,
	["CrouchDebounce"] = false,
	["RunDebounce"] = false,
	["Running"] = false,
	["LastTime"] = tick(),
	["MaxTicks"] = 0.2
}

or

local crouching = false
local crouchDebounce = false
local runDebounce = false
local running = false
local lastTime = tick()
local maxTicks = 0.2
1 Like

Personally it depends on the context. For example, I have a module script called Util with a bunch of random functions, so ideally I’d categorise those functions so my autocomplete isn’t littered with various other functions that I could accidentally autocomplete with.

In other cases though…

1 Like

I feel its really on preference, when I have simple values like a debounce or the root of a character, I usually just use variables, when it comes to UI elements I usually use a table instead of the large amount of variables I need to get everything I need.

Thats me personally though

1 Like

So, in theory, simple variables would be cleaner?