It doesn’t work in parameter script. The request page of the manual lists these exceptions.
There is no way around. Why do you need to store it as parameter, why can’t you work with the current value (2d, 3d, ui scripts)?
Library Platform, Software Engineer