Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is a good way to make bullet spread?

Asked by
joalars2 107
8 years ago

So i've been attempting to make guns in roblox, but i can only make ultra-accurate ones.

Do any of you guys know a good way to add bullet spread to a gun?

Thanks in advance,

joalars2.

2 answers

Log in to vote
0
Answered by 8 years ago

Math.random will be your friend. Similar to the diamond square algorithm, you can randomly change the spread of the bullet with adding or subtracting a random capped number in a random direction. Not exactly sure how to explain it but you can do Vector3.new(math.random(-x,x), math.random(-x,x),math.random(-x,x)) with X being predefined and then add that to the trajectory.

Ad
Log in to vote
1
Answered by 8 years ago

Try inserting a script that upon ignition, it places many other scattered bricks or parts around the main circuit part.

Answer this question