You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I want to run and return the value of the function in a ModuleScript
What is the issue?
It gives the error:
ReplicatedStorage.XpMod:4: attempt to perform arithmetic (pow) on table and number
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I searched around for solutions and was out of luck
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Basically i’ve been having a problem with modules, in which i have a function that’s used in multiple scripts. the module is as follows:
local module = {
calcXp = function(n)
print(n)
return math.floor(25*n^1.6)
end
}
return module
and here’s how i’m running it (after require()ing it) [xS is the module after being required)
maxXp = xS.calcXp(lvl.Value)
and this is the error I get:
ReplicatedStorage.XpMod:4: attempt to perform arithmetic (pow) on table and number