class_name Cat extends MeshInstance var images: Dictionary = {} var frame_i = 0 var lastt =0 func _process(delta): lastt += delta if lastt >= 0.05: lastt = 0 frame_i += 1 if frame_i >= 55: frame_i = 0 var material = get_active_material(0) material.albedo_texture = images[frame_i] # Called when the node enters the scene tree for the first time. func _ready(): for i in range(55): images[i] = load("res://cat/c" + str(i) + ".png")