So for example, In the game Piggy, there is build mode, where it creates and teleports you to the server... Can this be in a screen gui button and also in server-side script?
Use ROBLOX's TeleportService.
https://developer.roblox.com/en-us/api-reference/class/TeleportService
TeleportService:ReserveServer(OptionalGamePlaceThatYouOwn)
Creates and returns a code that can be used to teleport to a private instance of the server.
TeleportService:TeleportToPrivateServer(PlaceId, AccessCode, Player(s))
Teleports player(s) to the private server created with ReserveServer.
Remember that Google is your best friend.
So for this: TeleportToPrivateServer(PlaceId, AccessCode, Player(s)) , Do I put my place id, then the access code for the returned code of reserve server, and I am not to sure about Player(s)
You can always look at the docs for TeleportService and TeleportToPrivateServer for code samples on how to use something.
Maybe provide some more info on the values you are using for the teleport service