When doing countdown’s you’re best off not using a while loop. Reconsider how you approach the problem.
In this situation it would be better to use a for loop which will eventually end.
local number = 10
for count = 1,number,1 do
print(count)
intermissionText.Value = "Starting.. "..number..
wait(15)
end
local number = 10
while true do
if number > 0 then
number = number - 1
print(number)
intermissionText.Value = "Starting… "…number --[[instead of intermissionText.Value = "Starting… "…number]]
wait(15)
end
end
To add to what’s been stated here, as @xZylter said, a for loop is much better since you want it to eventually end and because in your code, once number is not greater than 0, it’ll crash since there’s no wait to yield the loop.
The issue you’re noticing is because of the … after number, it’s concatenating wait(15) with number. So the result is being messed up. Here’s the fixed and better code
local number = 10
for count = 1,number do --You could choose to do ,1 after the number, but roblox by default does that when the 3rd argument is not specified
print(count)
intermissionText.Value = "Starting.. "..count
wait(15)
end