am i using gui.ScreenToVector() wrong?

i was wondering if i am using the function wrong or if there is a problem with the function?

wait = CurTime()+.1
chat.AddText( Color( 200, 0, 0, 255), tostring( gui.ScreenToVector( gui.MousePos() ) ) )

the game keeps crashing
i am trying to get my mouse position on my screen converted to a world position. i know it a bit out of my ability but if anyone could help that would be great.

anyone know?

Use LocalPlayer():GetEyeTrace().HitPos. It returns the position of your cursor if the mouse is toggled on.

That isn’t your issue though - it’s just a different way to do it.

I can’t see why that would be crashing, email me the crash dumps: (steam/dumps/)

sent it to you :v:

also thanks DarKSunrise i will try that