-
What do you want to achieve? Different damage “types,” similar to Pokémon, within a ModuleScript that can be referenced as a cross-sectional table. For example: if the damage is fire, what is it strong against?
-
What is the issue?
I’m not sure where to begin. -
What solutions have you tried so far? I have laid out a few variables in a ModuleScript but cannot figure out a way to get the information I want. It could be that my approach is just way off.
Currently, when an entity is damaged, the server script checks a Module for the damage type to see if it exists.
local CMod = require(CombatModule)
—when the damage event is fired by client, a variable is sent called “dmgtype” which is a StringValue like “Normal”
print(CMod.dmgtype)
Here’s an example of what I have in CombatModule:
local AttackStrengths = {
Normal = {WeakAgainst = “Ice”, StrongAgainst = “Thunder”},
}
return AttackStrengths
Is my approach completely wrong? Also, I apologize for any mistakes, I’m on mobile and cannot actually paste my codes here.