Make sure to paste scripts instead of screen shots, very on-brand for your profile picture (love it btw)
func _on_interacted(_body) -> void:
$AudioStreamPlayer3D.play()
$pagedisplay.show()
# This doesn't wait for inputs, it check if "jump" is pressed *right now*
# only on the same frame the page is shown.
if Input.is_action_just_pressed("jump"):
$pagdisplay.hide()
I would make your interactable handle inputs through a _unhandled_input function, then disable it when the page isn’t shown
func _ready() -> void:
set_process_unhandled_input(false)
func _on_interacted(_body) -> void:
$AudioStreamPlayer3D.play()
$pagedisplay.show()
set_process_unhandled_input(true)
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("jump"):
set_process_unhandled_input(false)
$pagedisplay.hide()