# Scripting : Assign Event Mixer Master to a MixerGroup

**URL:** <https://qa.fmod.com/t/scripting-assign-event-mixer-master-to-a-mixergroup/17472>\
**Category:** FMOD Studio\
**Tags:** javascript\
**Created:** [July 23, 2021, 2:07pm UTC](https://qa.fmod.com/t/scripting-assign-event-mixer-master-to-a-mixergroup/17472 "2021-07-23T14:07:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brokener](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@Brokener](https://qa.fmod.com/u/Brokener)\
**Post date:** [July 23, 2021, 2:07pm UTC](https://qa.fmod.com/t/scripting-assign-event-mixer-master-to-a-mixergroup/17472/1 "2021-07-23T14:07:19Z")

</div>

Hi, I’m trying to assign Events to Groups in a script, but can’t find how to do it.  
Currently I have this line :  
event.masterTrack.mixerGroup.output = myGroup; (myGroup is a MixerGroup and I have the reference, it is named “sfx”)

But this does something weird : it creates a new group named “Master” in the “sfx” group, with a child group named “sfx”, and does not place the event in the group.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [July 26, 2021, 1:45am UTC](https://qa.fmod.com/t/scripting-assign-event-mixer-master-to-a-mixergroup/17472/2 "2021-07-26T01:45:25Z")

</div>

In order to route an event or group/send bus you actually need to set the `mixerInput`'s output to the group bus. For example:

```auto
event.mixerInput.output = myGroup;

```
