is there a good resource for finding how to implement nodes into your scripts?

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

So I’m doing something simple using GDScript, but long story short I have no idea what I’m doing. I want someone to click a button and then a video starts playing. (2D Scene btw) . My main issue is that I can’t find resources on how the basics work for implementing/manipulating nodes via a script works. Ideally, I want something simple like this. Longterm, however, I want to know how to utilize my other nodes.

     #unhide/make visible = true for VideoPlayer node.
	#videoplayer.play() ? idk how this works
	pass # Replace with function body.```

thanks for any help
:bust_in_silhouette: Reply From: SteveSmith

Your code is pretty much there:–

func _on_btn_options_pressed() -> void:
    $VideoPlayer.visible = true
    $VideoPlayer.play()
    pass

This assumes your tree has a video player in it. You basically refer to node via the $ syntax and call methods on them like above.