Why does this happen every time the round reaches round 3 or higher? How can I fix my code:
SendRoundInfoEvent.OnClientEvent:Connect(function(rapper1, timerr, round)
local serverMessage = script.Parent.Parent.ServerMessage
local timerDisplay = script.Parent.Parent.TimerDisplay
local timer = 30
local function displayAppropriateThings(roundNum)
serverMessage.Text = rapper1.." is rapping"
local initalTimerValue = timer
repeat wait(1) initalTimerValue -= 1 timerDisplay.Text = initalTimerValue.." Remaining" until roundInformation["Round"..tostring(roundNum)].Value == true
end
if round == "Round 1" then
displayAppropriateThings(1)
elseif round == "Round 2" then
displayAppropriateThings(2)
elseif round == "Round 3" then
displayAppropriateThings(3)
elseif round == "Round 4" then
displayAppropriateThings(4)
end
end)
