Problem with rotation

Hello,
I have a problem with a .rotate() function - it shows me this error:“entity.rotate is not a function”, what i have to do?

You have to show us your code at first.

The first thing that came on mind - you have to call
this. entity.rotate