Invalid set index ‘player’ (on base: ‘KinematicBody2D (’) with value of type ‘KinematicBody2D (’.

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

So in my player script, I get this error :arrow_up: at this line of code:

PlayerInfo.player = self

In the Members tab in the enemy node, it says player = null, even though I set it to res://player.tscnin the enemy script.
Any ideas as to what might’ve caused this error? Thanks in advance

:bust_in_silhouette: Reply From: SteveSmith

There is no such field “player” in PlayerInfo.