So I was trying to make a combat system and it involved a dictionary. Well when I finished the dictionary script there was an error (the error is the title of this topic) and it just stopped the entire combat system. I would really appreciate it if someone could help / try to help me, I’ve been trying to solve this for a few hours.
The script:
local Dictionary = require(script.Dictionary)
local DictionaryHandler = {}
function DictionaryHandler.find(player, action)
return Dictionary[action][player]
end
function DictionaryHandler.add(player, action)
if not Dictionary[action][player] then
Dictionary[action][player] = true
end
end
function DictionaryHandler.remove(player, action)
if Dictionary[action][player] then
Dictionary[action][player] = nil
end
end
return DictionaryHandler
When you’re calling methods in the DictionaryHandler ModuleScript, are you using Stunned for action or something else? If you’re using something else, you’ll have to add it to the table like Stunned: