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

Why does my timer error when I try to switch to another timer?

local Time = game.Workspace.Intermission.Value
local Game = game.Workspace.Game.Value

while true do
wait(1)
script.Parent.Text = Time
Time = Time - 1

if Time == -1 then
		script.Parent.Text = Time == false
	if Time == false then
		wait(1)
		script.Parent.Text = Game
		Game = Game - 1
	end	
	end
end

Time = the Intermission Time "15"

Game = the Game Time "60"

The error says: Players.NiceDerpling.PlayerGui.ScreenGui.TextBox.Script:10: bad argument #3 (string expected, got boolean)

1 answer

time == false

gives a boolean

you can fix it by doing

tostring(time == false)

2 comments

0

I have never heard of tostring before I will definitely try it out!

1

Did it work?

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