Hello @maryam mohammad ,
The Visual Studio compiler gives a clear answer: the variable or parameter named "player" is defined as a type that does not have property name "Top".
Please check the type of your "player" and change the type. Maybe 'casting' could be helpful too.