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

is it possible to make a script that repeats something until a brick collides with something?

Asked by 4 years ago

I want to make a laser script that fires a laser and keeps growing until it eventually hits another part. Can someone tell me if this is possible?

0
nothing is impossible lol Blackbooks 138 — 4y
0
This is possible but I am not good at raycasts. Sorry. NotTheChara 191 — 4y

1 answer

Log in to vote
2
Answered by 4 years ago

Yes, it is possible. Unfortunately, I cannot provide you with the script because this site is an helping site and not a request site.

But, here's a liitle help. Raycast Documentation : https://developer.roblox.com/en-us/articles/Raycasting

And then you can use a while loop and inside the loop, you can check whether the part touched something and if yes, you can break the loop.

Lemme know if it helps!

Ad

Answer this question