VoteStartModule
VoteStartModule
allows the players waiting in a game to choose when it starts. Upon joining, players’ hotbars are automatically filled with items that, when interacted with, register the player’s vote. Once at least half the players have voted, and the minimum player count is met, a countdown begins. If either of these conditions stops being met during the countdown, it is canceled. When the countdown reaches 0, the module will call GameStartEvent
, change the game state to INGAME
, and display a “GO!” title on the screen.
Usage
Import the module:
Use the module in your game’s initialize
function:
To check if a player has voted to start, use hasVoted
: