Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 comments

0

That's not very realistic.

0

Really? theres no way to add a charge?

1 answer

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

1 comment

0

I mean you would hold a button and the ball's size would increase, and when you release, it stops growing.

This discussion is preserved as it was. New answers, comments, and votes are closed.