total = nil
function tax(percent,num)
total = num * percent
end
tax(0.5,1255) -- line which errors
Output:
21:29:34.173 - No method name passed in __namecall for Object
I have no idea why this is happening. I tried this in the output itself and it worked, but when i try using it through a script it just calls out that error.
Help would be appreciated, this is really frustrating.

2 comments
Total should be defined inside the function as a local. It's rather unorganized to just have random variable names floating around in your main scope, and can potentially lead to hidden issues later on.
True you should generally define variables as local