The "weaponlevel" is always at atleast 100 when usable, and can increase up to 110.

For the overheated minigun bullets, the previous formula was "Overheat / 6". The overheat would never go above 100, and never shoot overheated bullets when below 40.

Open browser console in preview (F12), try to find a bullet with NaN damage, you'll be able to see the values of Overheat and WeaponLevel variables, maybe there is something wrong with them.

If this doesn't help, please post a small project demonstrating the issue.

.

Edit: (-10)^1.5 returns NaN, so the most likely reason is that WeaponLevel is less than 100 for some bullets. A simple fix would be adding max(WeaponLevel,100)

I've never really understood how clamps work. I tried this out, and at some points the damage would come out as 0, which I'm guessing would normally be the NaN? However, this formula you provided is also different than the one I normally use.

I tried putting it on my own formula, which turned into:

Edit: (-10)^1.5 returns NaN, so the most likely reason is that WeaponLevel is less than 100 for some bullets. A simple fix would be adding max(WeaponLevel,100)

I checked for this aswell. That is not the case. As long as the weapon is unlocked, it is at atleast 100. For the testing I'm doing, the WeaponLevel value is at 106.

I will try out the browser log part aswell.

However, I do believe it has something to do with the Overheat value, due to it constantly changing, and due to the NaN value coming out at random times

You can use clamp() or max() as suggested earlier in the thread to make sure x can never be a negative number, or you can change your formula to not use a fractional exponent.

You can use clamp() or max() as suggested earlier in the thread to make sure x can never be a negative number, or you can change your formula to not use a fractional exponent.

When using clamp the bullets still come out as NaN every now and then as I mentioned earlier.

The clamp formula that was suggested earlier was different than mine, and I want to use this formula (or something that ends up with the same results).