Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Some help with gun damage?

Asked by 10 years ago
ball = script.Parent
damage = math.random(20,30)
local hitt = false

I do not understand what 20,30 is for and how to increase/reduce it to a certain point.

For example, I want the gun to have 35 damage.

If you could help me out, that would be awesome!

1 answer

Log in to vote
1
Answered by 10 years ago

The 20, 30 makes it that it choose a random number between 20 and 30. To make the gun damage 35, simply replace math.random(20,30) with35

0
Thank you, you helped me out a lot! Tonitrua 20 — 10y
0
No problem! CardboardRocks 215 — 10y
Ad

Answer this question