Collision.gameObject issues

an error keeps popping up whith this. however i can’t see it.
can anybody else?
if (Collision.gameObject == “floor” )

By convention Class names will start with a capital letter, while local variables and function parameters will start with a lower-case letter.

If following this convention:

Collision (Capital C) is the class and is only able to access static members.

collision (lower-case C) is an instance and is able to access instance members.

As .gameObject is an instance member, representing the object involved in this collision, it should be accessed like this: collision.gameObject

The other issue is that you are comparing a gameObject with a string. It would be better to compare the name or tag like so:

if (collision.gameObject.tag == "floor" )

or

if (collision.gameObject.name == "floor" )