Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Block spawn randomization(like bullet spread)?

Hello, if I make a lightning script I will only be able to have just 1 form of it, like 1 order of the shapes(sizes and everything). How would I make it so that it will randomize the lengths and positions and still have them connect and hitting the target?

1 answer

Use this

math.Random()

Math.Random() make's it random

targetspos = {1,2,3} -- Change it to the position of the bricks.
x =  math.random(1, #targetspos)
print(x)

As you can see you can put the position of the bricks in targetpos to it changes the position of the lightning randomly, by using math.random.

This discussion is preserved as it was. New answers, comments, and votes are closed.