No, it works! You can use a text as a mask and it works. For having that effect, you should make a mask ( Typing any text that wou want and make that layer a mask ) and then making another layer under the mask layer ( that uses the mask ) and making a motion tween with your sun!
Now it's the sun that illuminates different parts of your text ( mask ) by passing through it. It means that when the sun passes the first character, then you can not see it anymore. I like this effect, but if you wana have all your text visible, you should make another layer below the masked layers and bring your text there again. You can do it easily by unlocking the masked layer, hitting CTRL + C and then locking the masked layer again, making your new layer BELOW all the masked layers and hitting SHIFT + CTRL + V to paste it exactly in the place that the text of the mask resides. Now you should only define the length of your new text layer. Usually you want it to have the length of your mask or longer.