Help! weird "Object reference not set to an instance of an object" error

I’m getting the “object reference not set to an instance of an object” error and it doesn’t make any sense in this instance.

any help would be highly appreciated.

Judging from the screenshots, it appears that “launchPoint” is not assigned to anything. You need to drag and drop a gameobject onto that reference in the inspector. (where it says “launchPoint None (GameObject)” )

EDIT: Oh I see, your trying to do transform.Find to get it. Well, do a “Debug.Log(launchPointTrans);” right after the assignment, and see if it is null or not.

Also, for future reference, instead of posting a screenshot of your code, copy and paste it and use code tags to make it look nice on the forum.

Make sure you save your script and return to unity to let it compile. It looks like you have unsaved changes, but I do not know what they are/were. :slight_smile: