The error console says getPosition is not a function. Here is my code:
var MonsterLookAt = pc.createScript('monsterLookAt');
// initialize code called once per entity
MonsterLookAt.prototype.initialize = function() {
this.target = this.app.root.findByName("Plr");
};
// update code called every frame
MonsterLookAt.prototype.update = function(dt) {
this.entity.lookAt(this.target.getPosition());
};
// swap method called for script hot-reloading
// inherit your script state here
// MonsterLookAt.prototype.swap = function(old) { };
// to learn more about script anatomy, please read:
// https://developer.playcanvas.com/en/user-manual/scripting/