Hello, I am still very new to Unity and I can't get this to work. I always get an error saying "NullReferenceException: Object reference not set to an instance of an object". I get this from the script with "just 1 line of code". I attached it to the player.
Can you perhaps explain a bit more in detail how to set this up?