Can't see my (animated) sprite

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By afaale

Hello all!
After working on a game, the (animated) sprite suddenly dissapeared and I have no idea what I have done. The collision box is still there, but I can’t move the character when starting the game, and the following error is given, once the skeleton mob collides with the player:

Invalid get index ‘health’ (on base: ‘KinematicBody2D’).

Is there any way to find out from the screenshot I attached, or is more information needed? I also included screenshots of the code, where the mistake is evoked, and where the player’s health variable is initiated.
If anyone helps me by any virtue, I would be exultant.

I fixed the visibility issue - somehow the modulate property of the root node “player” was altered. However, I still can’t move the player, and the same error is given.

afaale | 2020-03-05 13:26

:bust_in_silhouette: Reply From: jgodfrey

By the looks of that code, you should be referencing target.health, not player.health (assuming your player has a health variable).

Both “target” and “player” have the same address (1466), so that’s not the issue. Tried to change it to “target” though, but the same error is given, and the player sprite is still invisible and is unable to move (the camera stays in one place). However, the skeleton’s AI sees it, and follows it, before the game crashes and the mentioned error is given.

afaale | 2020-03-05 12:18