This code isn't working in my football game. Im making it so after the 2nd quarter theres halftime for 60 seconds. Why won't this work? When two people join the game doesn't start!
``
--Halftime
if quarter==2 and workspace.Clock.Value> 0 then message("Halftime",3); game.Workspace.music.Song1:Play() wait(60) quarter=quarter+1; workspace.Quarter.Value=numDisp(quarter); setup(false,true); Ready=true; Kickoff=true; end
The snippet you provided us with doesn't let us know what's wrong. If you want a game to start when two people join you'll need something like this:
function checkPlayers() return game.Players.NumPlayers > = 2 --If there are two or more people return true end function startGame() --This is where your game stuff is --Game stuff here-- end game.Players.PlayerAdded:connect(function() if checkPlayers() then --If checkPlayers() is true start the game startGame() end end)
If you have any further questions feel free to ask