Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How could i make this cooldown wait code more simple? [ANSWERED]

Code:

				wait(1)
				NumValue.Text = "10"
				wait(1)
				NumValue.Text = "9"
				wait(1)
				NumValue.Text = "8"
				wait(1)
				NumValue.Text = "7"
				wait(1)
				NumValue.Text = "6"
				wait(1)
				NumValue.Text = "5"
				wait(1)
				NumValue.Text = "4"
				wait(1)
				NumValue.Text = "3"
				wait(1)
				NumValue.Text = "2"
				wait(1)
				NumValue.Text = "1"
				wait(1)
				NumValue.Text = ""

I've seen it done properly, i just cant remember where.

If you need to know what it is for, it's a short cooldown message that appears on a door.

1 comment

0

U Simply Cant

2 answers

✓ Accepted answer
for i = 10,0,-1 do
wait(1)
NumValue = i
end

7 comments

0

numvalue.Text

0

Explain. Explain. Explain. Don't just post code.

0

Hey, he solved it for me, i didn't need any extra help! Cut the dude some slack.

0

When making answers on scriptinghelpers you are expected to explain your code and not just provide it.

0

explain the code.

0

It's a self explanatory for loop. If you can't understand this then you probably should learn the basics.

0

come back here 2 years later, this is Summer you literally said it wasn't possible so i don't know what makes you so special lol

counting = true
while counting do
	if NumValue.Text > 0 then
		wait(1)
		NumValue.Text = NumValue.Text - 1
	end
end

just do while wait() do and subtract the text

4 comments

0

sorry Imperialy, yours doesn't work properly.

0

NumValue.Text:len()

0

wot

0

10:len() doesnt even 10

This discussion is preserved as it was. New answers, comments, and votes are closed.