i don't understand this?

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

I’m new to Godot and was going off a tutorial on making a 3d maze game and there’s one part of code I don’t understand the problem and I don’t like asking for help on the internet most of the time so here’s my code: extends Spatial

signal level_completed()

func _on_Goal_body_entered(body):
if body is Player:

	emit_signal("level_completed")
:bust_in_silhouette: Reply From: Help me please

I think you should use this:-

signal level_completed()

func _on_Goal_body_entered(body):
if body.name ==  "Player":
    emit_signal("level_completed")