Ah, that stage in a script's progression...
#1
Where seeing it do absolutely anything would be a freaking miracle.
Debug, anyone?


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 = Instance.new("Box")
            Charge.Parent = game.World
            Charge.Position = Vec2D.new(math.random(340,342),math.random(19,21))
            Charge.Color = script.Parent.Color
            Charge.Size = Vec2D.new(0.1,0.1)
            Charge.Collidable = false
            Charge.CharacterCollidable = false
            Charge.Fixed = false
            Charge.Rotation = 0
            Charge.Velocity = Vec2D.new(0,0.5)
    firemylazor()
enabled = true
end
end)
  
function firemylazor()  
Matter = Instance.new("Box")
Matter.Parent = game.World
Matter.Position = Vec2D.new(math.random(340,342),math.random(19,21))
Matter.Color = script.Parent.Color
Charge.Size = Vec2D.new(0.1,0.1)
Charge.Collidable = false
Charge.CharacterCollidable = false
Charge.Fixed = false
Charge.Rotation = 0
Charge.Velocity = Vec2D.new(-20,0)
end

EDIT: Fixed one thing, code now is current, but still not working. t-t
~Phoenix, Buildism's resident flaming bird, CubeBomb Moderator, Lua Coder, and overall mature individual. :3
Reply
#2
Maybe this should be in the scripters section...
[Image: chaosthegreat.png]
Reply
#3
Is it still broken, and if it is, what should it do in the first place? O_o' I dont want to start guessing what it should do...
[Image: 76561198036192536.png][Image: Ava2.gif]
AntiBoomz0r @ roblox,xfire
AntiBoomz @ minecraft
MiikaFTW @ steam
Reply
#4
Is it supposed to be in a tool, a box, what?
Reply
#5
It's in a box which serves as a clickable button. It's supposed to cause red charges to appear at the position specified at random locations which float slowly upward.

After 50 of those charges are made, it's supposed to fire a large charge to the left at high speed.

Nothing happens when I click the button and no errors appear in output.
~Phoenix, Buildism's resident flaming bird, CubeBomb Moderator, Lua Coder, and overall mature individual. :3
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)