Ok so I have a script that returns the a UnitRay of the Mouse, and when you press the the "/" key to chat, the UnitRay becomes NAN,NAN,NAN. I've tried many ways to tell if the UnitRay is nil, but none of them work and my script ends up erroring. Is there any way to tell if the number is nil?
Note: I've tried tonumber(UnitRay), pcall(function() local Test = 2 * UnitRay end), and other methods

2 comments
Thank you so much! This helped a lot!
Remember you can mark answers as accepted so that other people finding your problem more immediately find the answer...