So I have powerups in my game but for some reason the minigun isn't working. I want it to shoot rapidly for 5 seconds. I'm not sure what I'm doing wrong here. It only shoots one bullet.
Also how do I make the RocketPropulsion go in a straight line from the minigun? I tried specifying the rocketpropulsion without a target but it just goes to the center of the baseplate.
function Minigun()
repeat
local rocket = Instance.new("Part", script.Parent.Physical)
local propthing = Instance.new("RocketPropulsion",rocket)
local rocketscript = script.Parent.Physical.RocketScript:Clone()
local offset = 10
local fire = Instance.new("Fire")
rocket.Position = script.Parent.Parent.Position + script.Parent.Parent.CFrame.LookVector*offset + Vector3.new(0,10,0)
rocket.Size = Vector3.new(1, 1, 4)
rocketscript.Parent = rocket
rocketscript.Disabled = false
rocket.BrickColor = BrickColor.Random()
fire.Parent = rocketscript
propthing.CartoonFactor = 1
propthing.MaxSpeed = 1000
propthing:Fire()
warn("Incoming rocket from the Big Rig!")
until wait(5)
end

4 comments
i dont see a wait(5)
I put the repeat in the wrong place. I did it again and it still doesn't work. Will update.
I put the repeat in the wrong place. I did it again and it still doesn't work. Will update.
Hello? Does anybody care about this??????????????????