You choose a target creature for Glistening Oil as you cast it, just as you would with any Aura. If that creature is an illegal target when Glistening Oil tries to resolve, Glistening Oil won't resolve and will be put into its owner's graveyard. It won't enter and its last ability won't trigger.