(function () { var _this = this; _this.preload = function (entityID) { _this.entityID = entityID; } _this.collisionWithEntity = function (idA, idB, collision) { print("Entering entity!"); // Replace the script with the URL to attach to another entity var addScriptProperty = { "script": "https://hifi-content.s3.amazonaws.com/liv/dev/ColorChangeWand/Edible.js" }; Entities.editEntity(idB, addScriptProperty); } })