Why isn't my dialogue showing when I play the scene (using RichTextLabel and Tween)?

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

I am using RichTextLabel for a visual novel but when I play the scene, only the visuals like background and images and text box shows, my text (dialogue) that I coded doesn’t show and I’m not getting any error in my code either so I’m not sure why it isn’t working.

If someone knows or has any ideas, I would appreciate it if you could help me out here. Thank you in advance!

(blob:https://mail.google.com/31767a02-507a-4110-b124-1888f0c3bab6) ~ Image


extends Control

onready var text = get_parent().get_node(“Dialogue”).dialogue_1

var dialogue_index = 0
var finished
var active

var position
var expression

func ready_():


func _phyysics_process(delta):
if active:

		if Input.is_action_just_pressed("ui_accept"):
			if finished == true:
				$TextBox/RichTextLabel.percent_visible = 1
				finished = true

func load_dialogue():
if dialogue_index < text.size():
active = true
finished = false

	$TextBox.visible = true
	$TextBox/RichTextLabel.bbcode_text = text[dialogue_index]["Text"]
	$TextBox/Label.text = text[dialogue_index]["Name"]
	position = text[dialogue_index]["Position"]
	$TextBox/RichTextLabel.percent_visible = 0
		$TextBox/RichTextLabel, "percent_visible", 0, 1, 2,
	$TextBox.visible = false
	finished = true
	active = false
dialogue_index += 1

func _on_Tween_tween_completed(object, key):
finished = true