So my assignment especially from my last thread where I have to create a 3d object to get it working.
So I created a hidden panel which was part of a requirement. In order to have it appeared. the 3D object needs to be clicked in order to appear (which technically would destroy you anyways.
I cannot figure out what the proper code is for my primary mouse button because I want my mouse to click on the mine which would bring up this hidden GameOver panel.
You have the correct code for primary mouse button, but it’s inside an OnTriggerEnter. The trigger code happens in 1 frame, so it’s unlikely you will click the mouse button at the same time.
You could move the primary button code inside an OnMouseDown() function.
Or, you can use the GetMouseButton code inside the Update() function and fire a Physics.Raycast to see what it hits.