game:GetService('NetworkServer') = The current identity (4) cannot create a NetworkServer (lacking permission 6)

When you use game:GetService('NetworkServer') it will lead to an error.
The current identity (4) cannot create a NetworkServer (lacking permission 6)

When I was not trying to create a network server.

Is this a bug or something?

Are you trying to get it on Client?

Yes, because I want to switch to the server in studio, not in running mode.

You can’t get NetworkServer on client console or localscript, you have to use server console or serverscripts to access it and in order to switch to server on studio you need to run your game first, there is no other way.