Is object B getting collisions other than object A? If it is, make sure the script knows that the area_3d.get_parent() has to be object A for it to try and get the power variable.
it has an area and a collision shape. Both set to “powersource” group.
obj B has an area with collision shape as well. The area scales up and covers the area of obj A every 5 seconds. (this works! since obj B can print the .name of the parent of obj A)
obj B looks like this:
extends Node3D
@export var power : float = 0.0
func _on_area_3d_area_entered(area: Area3D) -> void:
if area.is_in_group("PowerSource"):
print(area.get_parent().name)
power = area.get_parent().power <----------------------------FAILS! :worried:
func _process(delta: float) -> void:
#doing the things that i dont need to write here, since it works.