How to modify the Transparency of an AnimatedSprite2D?

Godot 4.3

I’ve been looking for a way to modify the transparency in the code of an AnimatedSprite2D node. But I can’t seem to find a way, does anyone know if there’s a way?

You want modulate or self_modulate inherited from CanvasItem.

self_modulate = Color(1.0, 1.0, 1.0, <transparancy value>)

Transparency will range from 0.0 (fully transparant) to 1.0 (opaque).