You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to create a raycast from a part and ends 10 studs (the ray cast fires according to the part direction)
What is the issue? Include screenshots / videos if possible!
I don’t know how to do it or at least what I knew does not work
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
cry😭
By part direction, do you mean the front of it? You can use the part’s CFrame LookVector for that, which is the direction its facing. Since it’s a normalized vector, you can multiply it by any number to extend it by n studs
workspace:Raycast(part.Position, part.CFrame.LookVector * 10)
1 Like
and what if i only can use position and not Lookvector?
Is it possible?
It’s not possible to get the direction of the part if you only have the position. Is there any reason you can only use the position?
Oh, I see that you want to get the direction from the part to the mouse. I’ll move on to that thread
1 Like
system
(system)
Closed
October 5, 2023, 8:54pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.