Skip to main content
Question

How to setProperties only on certain instances in a set?

  • May 18, 2024
  • 1 reply
  • 123 views

aen-infloww

I’m doing a Instances.forEach((i) => { i.setProperties({"signal": "red"}) }) but the problem is not all is not all instances in Instances has the property signal, so when it encounters such an instance, it breaks with an error like blah blah does not exist.

How to I do a if (i.propertyExists("signal") { i.setProperties({"signal": "red"}) }?

This topic has been closed for replies.

1 reply

tank666
  • May 18, 2024