Ah, that stage in a script's progression...
#6
Edit: Got it to generate the boxes, the velocity is broken, though.

Code:
enabled = true

link(script.Parent.Clicked, function(player, btn)
    if not enabled then return end
        enabled = false
        lazorcharges=50
        for i=1,lazorcharges do
            sleep(0.1)
            Charge = create("Box")
            Charge.Parent = game.World
            Charge.Position = Vec2D(math.random(340,342),math.random(19,21))
            Charge.Color = script.Parent.Color
            Charge.Size = Vec2D(0.1,0.1)
            Charge.Collidable = false
            Charge.CharacterCollide = false
            Charge.Fixed = false
            Charge.Rotation = 0
            Charge.Velocity = Vec2D(0,50)
  
end
firemylazor()
enabled = true
end)
  
function firemylazor()  
Matter = create("Box")
Matter.Parent = game.World
Matter.Position = Vec2D(math.random(340,342),math.random(19,21))
Matter.Color = script.Parent.Color
Charge.Size = Vec2D(0.1,0.1)
Charge.Collidable = false
Charge.CharacterCollide = false
Charge.Fixed = false
Charge.Rotation = 0
Charge.Velocity = Vec2D(-200,0)
end
~Phoenix, Buildism's resident flaming bird, CubeBomb Moderator, Lua Coder, and overall mature individual. :3
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)