#Open a Form when you hit an entity?
1 messages · Page 1 of 1 (latest)
use the entityHit event
world.events.entityHit.subscribe(({entity, hitEntity}) => {
if (hitEntity.typeId == "namespace:name") {
form.show(entity).then(() => {}).catch(() => {});
}
});```
it keeps saying TypeError: cannot read property 'typeId' of undefined at <anonymous>
nvm, its because i keep hitting blocks