GetComponent<> was not showing up in the drop-down list(line 13), so I just wrote it manually. later when I tried to run the game it won’t do because of the error.
I am an absolute beginner, just following a youtube tutorial. I tried to run the game at every step and it was going perfectly. This is the only script that has shown an error even after following the exact youtube steps. I’ve looked for solutions online but none of them give me the answer I need
For reference, this is the video I’m following-
https://www.youtube.com/watch?v=XtQMytORBmM
You are using “FindObjectswithTag”, note Objects, this returns therefore an array of objects, not a single gameobject, Im not going to watch a tutorial to find the timestamp this is relevant from… life is short.
Im guessing it wasnt supposed to be Objects but Object
OK so i skimmed through and to prove my assumption was right
Dont know why you have visualscripting used at the top, but, in short, attention to detail is a very important skill when programming
Thank you so much. Will remember to check very thoroughly from next time
Enjoy, please mark your question solved