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

How can I get this ray to only create at the exact position forward?

Asked by
Hero_ic 502 Moderation Voter
8 years ago

So I am using raycasting for my laser shooting script like in the tutorial on the wiki. but I am trying to modify it to where it only shoots from the gun and does not go to the mouse position.

Ray.new(gun.Boom.CFrame.p, (mouse.Hit.p - gun.Boom.CFrame.p).unit * 300)

I just can't figure it out I've tried so many different ways.

**If you decided to help thank you! ~KIHeros **

Answer this question