First I use: PreloadPlayerObjects = true;
Then I use:
player.PlayerObject.Set("Username", "MyUserName");
player.PlayerObject.Save();
When I do this I get an error somewhere else in the code where I know there is no error. If you instead set "Username" as an Int it works and it also works if "Username" is already created. So the bug seems to be that it bugs out when you try to create a new String this way.