How can I create an infinite NumberValue?

Developing a game (FPS), wanted to make the ammo for a gun infinite so I resorted to setting the NumberValue to “99e99,” is there a way I can make the number infinite?

  1. I dont want there to be any crazy NumberValues, I am trying to keep the GUI concise.

  2. Screenshots of the GUI and Directory

Images



Screen Shot 2020-04-21 at 09.07.22

  1. What solutions have I tried so far? I tried setting the value to “0”,“nil”,“inf”, but because its a number value any letters will default to 0 and it will result with the gun ammo-less.

I am not super well versed in scripting, so I apologize if the solution is clear but if you can offer any support/advice it will be very much appreciated, so thank you!

Use math.huge instead.
(30 chars)

2 Likes

I mean you can just set it to inf and then just add a check inside of the gun to not take away any ammo if its inf and just keep reloading no matter what

1 Like

by doing (anynumber/0). basically any number divided by zero will return inf and i tested it in roblox studio already –

4 Likes