The Attempt to call a nil value Problem

Sorry, here is the exact code.

For a better explanation of the problem, lets break down the error. It says “attempt to call a nil value”, which in your case meaning it attempted to call your function called “effectsDefaultDamage” under your module “EffectsModule” but couldn’t find it. This is because when you define a function in a module script, it isn’t automatically put under the table you are returning in the modulescript. You have to say EffectsModule.effectsDefaultDamage because otherwise the function won’t be added to the table, and it can’t be called since it isn’t in there and you can’t reference it, hence causing your error.

1 Like

Yes, the entirety of it, or at least the portion that defines effectsDefaultSlash.

I am actually cleanfully stupid and I thought it won’t do nothing, but now I see! Thanks a lot!

1 Like