Hello! I am trying to tackle a system where the script checks if a bool value is true and then if the function in the table shares the same name with it it puts it into another table, I have tried so many different ways and I just can’t seem to get it to work.
local attackFunctions = {
slash
}
local useableAttacks = {}
for i,values in pairs(config.attacks:GetChildren()) do
if values.value == true then
table.insert(useableAttacks, attackFunctions[values.Name])
end
end
Here is a glimpse of what I am trying to do, albeit this version doesn’t work it is the most recent code I have for it. Any help that will point me in the right direction will be greatly appreciated. Thank you all who help in advance!