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
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