0 votes

The solution was get_node is wrong so ima post the scene with code now. I asked this but the solution they gived didn't worked.

func _ready():
$Props.visible = false
$EButton.visible = false

My scene :

Player(KinematikBody2D)

PlayerSprite
Props
EButton
CollusionShape2D
Area2D

CollusionShape2D

Godot version 3.2
in Engine by (44 points)

1 Answer

–1 vote

Props node does not exist at the moment of players ready function

by (1,154 points)

I assume this ready() function belongs to Player script ?
If Yes, than I answered correctly, this kind of error only appears when node after"$" is not a child of scene, who calls it. You have shown Your scene scheme and it looks correct, but You must ask yourself if maybe $Props is not YET child of Player at the moment of trying to change visibility, or did Props change path or name at the moment of changing visibility. You must have messed up something silly

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.