I have been working on this all day and not getting it.
First, is $(AddRole) really a function that I can use? Because I have tested it and it didn't work. I did what you suggested:
On the email field, under Advanced Field Options > Client Side Events, I added this one line
$(AddRole) = Yahoo;
I have created a security role called "Yahoo". Based on what I understand, every registration should put the account into the Yahoo security role, correct? But it doesn't do that.