I wanted to rotate this model but it seems to not work, is the scope the problem?

Compare your code with the BeginnerExample step 3 from the collection.