How to make a button that first checks if there is a server available then if there connect's to it if not creates a server

hay there iam creating a multiplayer game like fortnight or pubg but i got stuck at creating my main menu i wanted to create a button that finds a server or creates a server when clicked

Thats something that may be hard depending on how do you want it to work. You can’t realy easily check if there is server running (What are you doing that for). Just make button (with name for eg: HOST) then Open level with ?Listen parameter. There can’t be 2 listen servers on one game client. If somebody launcher separate dedicated then there is not problem right? If somebody launched dedicated this person know what’s doing.

If you realy need to check if there is server running have fun with

It’s working perfecly for me (Code above translates domain into IP, you will need to find way how to check if there is server running)

maybe check

Hope that helps.