I'd like to attach gdscript to a node at runtime with something like this:
var cscript = load( ReVA_PATH_CONSTRAINT )
for i in range( node.get_bone_count() ):
var bname = node.get_bone_name(i)
var ba = BoneAttachment.new()
node.add_child( ba )
ba.bone_name = bname
ba.script = cscript.new()
There is no error, but when i print ba.script, the attribute is still to null.
Am I missing something? Or it is simply not the way to do this?
Thanks in advance,