I am adapting an arcade expression attribute rule by @JohannesLindner (https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-pass-a-value-from-parent-to/m-p/1124219#M48859) where I have a relationship class. Arcade isn't a particular strength and could use an assist debugging. Here is this script and the error.

I need to pass a field value (project_pw) from parent to child when children are created.
Any tips would be greatly appreciated.
Tyler
ArcGIS Pro3.2.0
<for copy/paste>
// by JohannesLindner, <edited>
var parent_fs = FeatureSetByRelationshipName($feature, "t12_projects_rc")
// return nothing if no parent feature was found
var parent = First(parent_fs)
if(parent == null) { return }
return parent.project_pw
<error>
Invalid expression.
Error on line 4.
Expected array or feature set