wait(3) h = Instance.new("Hint", game.Workspace) plrs = game.Players:GetPlayers() function StartGame() if #game.Players:GetChildren() > 1 then h.Text = "Welcome to MrSmeny and MrSmenryBackup's Sword Fighting Tournament!" wait(3) h.Text = "The rules are simple, sword fight other people in duels and win!" wait(3) h.Text = "Please wait, loading map and deciding players." wait(3) h.Text = "This game is in beta, come back later." else h.Text = "There must be 2 or more players to start. Invite some friends." end end
When I get 2 players in the game, my hint is empty. Why is that?
From the snippet you have provided, nothing ever calls the StartGame
function. Since nothing calls it, the code inside will never execute.
Continuously (every few seconds or fractions of a second) call StartGame
, in, for example, a while
loop.
It would also probably be wise to return success or failure. (e.g., return true
in the then
block and return false
in the else
block)