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

Countdown not working because of a local error. Anyone help?

So, I was developing the countdown section, and when I wanted to test the countdown, it didn't work because of this error:

19:07:42.765 - Workspace.Script:10: attempt to call local 'supernewvalue' (a number value)
19:07:42.767 - Stack Begin
19:07:42.767 - Script 'Workspace.Script', Line 10
19:07:42.767 - Stack End

The countdown script is located inside the workspace. The Int is located inside the workspace too.

And the TextBox is located inside game > StarterGui > ScreenGui > TextBox.

Hope you can help me!

local Int = workspace.Int.Value



while true do
	wait(0.001)
	local newvalue = Int - 1
	wait(1)
local supernewvalue = newvalue		
	game.StarterGui.ScreenGui.TextBox.Text = 'You have'..supernewvalue'till we start!'
	if newvalue == 0 then
		
		break
	end
end

2 comments

0

There are a lot of small problems here that can be resolved with debugging.

1 answer

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