How to raycast from a vector3 point to a gui?

Ok so I’m trying to make a crosshair for guns ect for mobile support. Since I am using a raycast gun, I need to raycast from the gun handle to the GUI(crosshair). Ty for reading this! Have a nice day!

One of these should should put you on the right track:

Which one you use will probably depend on how you’re getting either the direction or target of the projectile. Hope this helps. LMK if you have further questions!

1 Like

ok i would try it. Thanks for helping and have a nice day!

An easier way might be to use Mouse.Hit.Position (or mobile equivalent). If you want a cursor which exist where the bullets will hit then I would Raycast from the bullet spawn-point to the target and move a part with a billboard GUI crosshair to the hit location.

1 Like

How do I get the x and y pos of a gui???
The pos of a gui is a UDIM value
Hope u can help =D

Use .AbsolutePosition to see their actual position on the screen.

1 Like