How can i make a GUI voting game mode system? (with round system)

Hello, I came on here to learn how I can make a GUI voting game mode system. (with a round system)

Like if I had 3 game modes (Team deathmatch, free for all, etc) players can vote for which one they would like to play for that round.

You need a server script to do the following:

  • Tell each client ( FireAllClients() ) that a vote has started so they can show the voting GUI
  • Listen for votes from the clients
  • Counts the votes after the vote ends and takes the correct action

You will also have a LocalScript in a GUI doing the following:

  • Listening for the vote start event from the server, showing the GUI when it arrives.
  • Firing the user’s vote to the server script when they click a button in the GUI.
  • Hide the GUI when the vote ends

Make sure that you sanity check the info provided by the clients to prevent exploits. For example players should not be able to vote more than once, only during the voting period, and only for options that have been made available. This is a frequent place where games have exploit-causing mistakes. In Solar Conquest II for example, they don’t check to make sure you aren’t allying a team with itself, which will softlock the game.

1 Like

Wow, thank you so much for all that information. But the thing is I’m not the GREATEST scripter. So I was wondering if you can help me out with that a bit.