I made this simple countdown script by repeating things, but when I said like, one second, two second, it was like slower than I was counting. Plus I am making a countdown for the new game I am making which has a movie in it. I set the movie to start in 20 seconds, but it started 2 seconds early. This is the script:
local c = game.Workspace.Countdown.SurfaceGui.TextLabel
while true do
c.Text = 20
wait(1)
c.Text = 19
wait(1)
c.Text = 18
wait(1)
c.Text = 17
wait(1)
c.Text = 16
wait(1)
c.Text = 15
wait(1)
c.Text = 14
wait(1)
c.Text = 13
wait(1)
c.Text = 12
wait(1)
c.Text = 11
wait(1)
c.Text = 10
wait(1)
c.Text = 9
wait(1)
c.Text = 8
wait(1)
c.Text = 7
wait(1)
c.Text = 6
wait(1)
c.Text = 5
wait(1)
c.Text = 4
wait(1)
c.Text = 3
wait(1)
c.Text = 2
wait(1)
c.Text = 1
wait(1)
c.Text = 0
wait(1)
c.Text = "Movie has Started!"
wait(15)
end
I am trying to get this start in this precise timing on this script (Thanks Goulstem for helping me this):
local bin = script.Parent
local decal = bin.Decal
local MainSlides = {
["1"] = {'http://www.roblox.com/asset/?id=213163470', 15},
["2"] = {'http://www.roblox.com/asset/?id=213486920', 3},
["3"] = {'http://www.roblox.com/asset/?id=157656296', 3},
["4"] = {'http://www.roblox.com/asset/?id=213486967', 3},
["5"] = {'http://www.roblox.com/asset/?id=151111211', 3},
["6"] = {'http://www.roblox.com/asset/?id=213487020', 3}
}
function getNumTabs(tab)
local num = 0
for i,v in pairs(tab) do num = num + 1 end
return num
end
function runTable(tab)
for i = 1,getNumTabs(tab) do
local currentTab = tab[tostring(i)]
decal.Texture = currentTab[1]
wait(currentTab[2])
end
end
while wait() do
runTable(MainSlides)
end
When it says Movie has started, I put wait wait 15 secs. since 2-6 says 3 seconds, and 3 times 5 equals 15. I hope you understand what I am asking. I am not good at asking clearly :D

1 comment
Thanks bro. Especially for explaining them.