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

How would I add a working charge to my bullet script?

Asked by 7 years ago
Edited 7 years ago

I am making a gun where you can hold click to charge up a gun, and you release click to shoot. I have kind of an idea of how to do that, but I don't know how to add a maximum charge at the same time. Like you can only charge it for a certain amount of time. The below is an if statement that charges the gun

--I want to try to add a while mouse is clicked thing, but I don't know how!
for i = 1,(game.Players.LocalPlayer.Stats.Level.Value + 4) * 10 do          
    bullet.Size = bullet.Size + Vector3.new(0.1,0.1,0.1)
    wait(10/(game.Players.LocalPlayer.Stats.Level.Value+1)/150)
end
0
That's not very realistic. User#11440 120 — 7y
0
Really? theres no way to add a charge? connor12260311 383 — 7y

1 answer

Log in to vote
-1
Answered by 7 years ago

First of all your size of bullet is Vector3.new(.1, .1, .1) the smallest you can get is .2 and i still do not completely understand what you mean by charge i have just made a gun script you are welcome to review it and use it

0
I mean you would hold a button and the ball's size would increase, and when you release, it stops growing. connor12260311 383 — 7y
Ad

Answer this question