sprite pause is causing error...

I’m using object:pause() for some sprite objects when a scene is getting left but get the following error on the sprites:

attempt to call method ‘pause’ (a nil value)

What can cause this?

Maybe when the sprite already got paused before and the pause is called a second time?

Are you sure the sprite objects exist when you are attempting to pause them?

I’m not removing the object and before pausing it I have a check like: if object then …

Are you sure the sprite objects exist when you are attempting to pause them?

I’m not removing the object and before pausing it I have a check like: if object then …