Why does my door automatically open upon joining the scene

Godot Version

4.3

Question

Just what the title says, every time I open the scene my door automatically plays its open animation and its really annoying. Any help is great!
(I have 3 different scripts, 1 for my interacting raycast, 1 for the code to interact with, and 1 for my door)

Door:

extends Node3D

@onready var Door_Toggle := $"01/door/Door_Open-Close"

var Playback : AnimationNodeStateMachinePlayback
var isOpen := false

func _ready() -> void:
	Playback = $AnimationTree.get("parameters/playback")

func Toggle(_body) -> void:
	isOpen = !isOpen
	if isOpen:
		Playback.travel("Door_Open")
		Door_Toggle.play()
	else:
		Playback.travel("Door_Close")
		Door_Toggle.play()

Raycast:

extends RayCast3D

@onready var Prompt := $Prompt

func _physics_process(_delta: float) -> void:
	Prompt.text = ""
	
	if is_colliding():
		var Collider = get_collider()
		if Collider is Interactable:
			Prompt.text = Collider.Get_Prompt()
			
			if Input.is_action_just_pressed("Interact"):
				Collider.Interact(owner)

Object Interaction:

extends CollisionObject3D
class_name Interactable

signal Interacted(body)

@export var Prompt_Message := "Interact"

func Get_Prompt():
	var Key_Name := ""
	for action in InputMap.action_get_events("Interact"):
		if action is InputEventKey:
			Key_Name = action.as_text_physical_keycode()
			break
	return Prompt_Message + "\n[" + Key_Name + "]"

func Interact(body) -> void:
	Interacted.emit(body)

Code looks clean. If its still happening it must be something outside these scripts.

Is it possible the animation tree is doing some kind of auto-play on load? or has some kind of default animation transition it starts with?

If neither of those are the problem you could try playing a door_close animation in the door’s _ready(). Its a very unsatisfying solution, but I don’t see anything in the code that would be triggering the animation, so my next guess would be something about the animationtree. ¯\_(ツ)_/¯

{AB13B9D0-F0E0-4987-B2A5-C5AB7989B4D8}

I don’t exactly know how animation trees work I just watched a tutorial, but is the line with an arrow have to do anything with it?

The arrows at the end of the line means the animation tree will wait till the end of the animation to travel.

Could you add print statements to Interact or Toggle to see if anything script-wise is firing; otherwise maybe the animation is set to auto play.

Nope, checked the animation to make sure it wasn’t on autoplay, and checked with a print to make sure if it was saying it was open when it wasn’t, didn’t work