#Why does this draw the lines at air and draw multiple lines?

1 messages · Page 1 of 1 (latest)

celest hound
#
on place:
    if name of player's tool contain "&8Junk":
        remove 1 of player's tool from player's tool
        set item cooldown of player's tool for player to 1 minute
        set block at event-block to player's tool
        set {B::%player%} to event-block
        set {Junk::%player%} to true
        if {B::%player%} is not a block:
            loop 15 times:
                loop all blocks in radius 10 of {B::%player%} where [input is not bedrock or {B::%player%} or air]:
                    set {_vector} to vector between {B::%player%} and loop-block
                    set {_Length} to distance between {B::%player%} and loop-block
                    set {_vector} to normalized vector {_vector}
                    set {_shape} to a line from direction {_vector} and length {_Length}
                    set {_shape}'s particle to electric spark
                    draw shape {_shape} at {B::%player%}
                    break loop-block with effects
                    wait 2 ticks
            set {B::%player%} to air
            delete {Junk::%player%}
            delete {B::%player%}
        else:
            cancel event
            send "%prefix("Error")% &7You already have a &8Junk &7Placed!" to player
#

Fixed it