Multi-hitting raycast!

So I made a multi hitting raycast and thought I would share it with you!

If you want a ful tutorial on it check it out here.

Also a note on why I’m making this a resource to is so more people will probably see it and be able to use it. Most people look at Resources over tutorials.

Anyhow here we go!

what is a multi-hitting raycast?

A multi-hitting raycast would be basically used for lasers for instance.
It fires a raycast between to points. The start and the goal.

It detects every part between to positions.
And then it returns a table so you can get all those parts and use them.

See it in action.

I made it so every part that it hits gets destroyed, as you can see here, It deletes the parts that it hits

If you wish to use it now you can either
A: Download the file here
Multi-hitRaycast.rbxl (42.1 KB)
B: Copy this code
C: Follow the tutorial here!

If you have any questions feel free to ask!
Also I recommend following the tutorial, it covers the whole thing and how it works.

1 Like

So its technically wallbanging. Lol thats neat. Good for newbies.

1 Like

I think Roblox is actually adding this sort of thing as a feature!

1 Like