![image](/secure-uploads/uploads/original/5X/c/5/a/e/c5ae57472712a3e3137c16f6c084aceacbe00946.png)
This error keeps printing when my ray.Instance returns as nil even though I have an else statement to provide another function. Sorry if this is explained poorly, it’s very late at night.
Any assistance helps!
Seems that you dont have a RaycastResult.
Check if there is a Result before trying to compare if the Object in the Result is nil or not:
if raycastResult then
-- Your code
warn(raycastResult.Instance)
else
warn("no raycast result")
end
Thank you! I would’ve never probably thought about that, haha
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.