extends Node2D const GrassEffect = preload("res://Effects/GrassEffect.tscn") # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func create_grass_effect(): #var GrassEffect = load("res://Effects/GrassEffect.tscn") var grassEffect = GrassEffect.instance() # var world = get_tree().current_scene get_parent().add_child(grassEffect) grassEffect.global_position = global_position func _on_Hurtbox_area_entered(area): create_grass_effect() queue_free()