Source Undefined When Trying to copy Template

I am trying to spawn entities throughout my scene by copying a set few templates and then placing them around. However I keep getting this error:

I assign the templates as attributes to my script, so they should be accessible. I can also print them in the console. I don’t believe that this is an issue with the templates themselves as when testing with templates copied and placed by other scripts, I have the same issue.

Here is my scene and the offending script, which is attached to the “SPAWN BALL” entity.

Lines 103, 106, and 109 need to be along the lines of this.chickenTemplate.clone(); and not this.chickenTemplate.copy();. This is because there is no entity method called .copy();. I recommend reading the docs here for further info.

I could’ve sworn I used clone… thank you, this worked :sweat_smile: