How To create script to automation ON or OFF sound

Hello Everyone,
I want to ask. Currently, I have some problems with my project.
I have several screens that have the requirement to make automation turn off and turn on sound based on a bit from the tag address.
Can you guide me on how to make some script when tags have value 1 so the sound will be active until the value changes to 0 to turn off the sound?

You can play a sound with this (if the sound is on)

1 Like

What do you mean, turn sound on and off ? What sound ?

Sorry my bad, I mean audio-component in perspective

Well then you can just bind the play property to your tag. The only scripting you might need is in a a transform to convert whatever value your tag hold into a boolean, though you should be able to do this with an expression

image

1 Like