For some reason this math is giving 0?

Hello, I am trying to multiply 2 values by each other. Here is the math:

local multiplier = materialMultiplier * part:WaitForChild("PartMultiplier").Value

The partMultiplier is an int value here:

The materialMultiplier is decided by an if and it’s currently set above 0.

0*1 equals to 0. What else did you expect lol?

image

1 Like

But both values are above 0, It should at least be 1.

Try printing materialMultiplier and part:WaitForChild(“PartMultiplier”).Value separately and see what value you get for each.

Are you sure you are changing the value correctly/setting the correctly.

Also print out what @ShortMovies_YT said.

I did, it said 0 for some reason.

Which one said 0? If it’s not supposed to be set to 0, make sure you’re setting / changing it correctly

I assume this is 0? Since the other variable is specifically set to 1

1 Like

Can you send the part of the script where you reference material multiplier and part?