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

What is a good way to make bullet spread?

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

✓ Accepted answer

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.

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

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