Script is not working they way i want it to

I am trying to have my script make a frame visible and another frame invisible when the timer is at 0:00
however, It does not work and I can’t figure out how to get it to work.
Can someone please help me?

local Timed1 = script.Parent.Timed1
local Timed2 = script.Parent.Timed2
local Timed3 = script.Parent.Timed3

	if script.Parent.TextLabel.Text == "0:00" then
		script.Parent.time3.Enabled = false
		Timed1.Visible = false
		Timed2.Visible = true
	print("changed")
	wait(2)
	script.Parent.time2.Enabled = true
	wait(0)
	script.Enabled = false
	end

This runs in a loop.

Open to see the code.
local Timed1 = script.Parent.Timed1
local Timed2 = script.Parent.Timed2
local TextLabel = script.Parent.TextLabel

while true do
	if TextLabel.Text == "0:00" then
		script.Parent.time3.Enabled = false
		Timed1.Visible = false
		Timed2.Visible = true
		print("changed")
		wait(2)
		script.Parent.time2.Enabled = true
		wait(0)
		script.Enabled = false
	else
		wait(1)
	end
end

With other 2 other scripts that work the same it rarely changes

Here is the script, you can loop if you want. I just changed false and true thats all:

local Timed1 = script.Parent.Timed1
local Timed2 = script.Parent.Timed2
local Timed3 = script.Parent.Timed3

	if script.Parent.TextLabel.Text == "0:00" then
		script.Parent.time3.Enabled = false
		Timed1.Visible = not Timed1.Visible
		Timed2.Visible = not Tİmed2.Visible
	print("changed")
	wait(2)
	script.Parent.time2.Enabled = true
	wait(0)
	script.Enabled = false
	end

So far nothing has been working

Make sure the text is exactly equal to “0:00”

local Timed1 = script.Parent.Timed1
local Timed2 = script.Parent.Timed2
local TextLabel = script.Parent.TextLabel

TextLabel:GetPropertyChangedSignal("Text"):Connect(function()
	if TextLabel.Text == "0:00" then
		script.Parent.time3.Enabled = false
		Timed1.Visible = false
		Timed2.Visible = true
		print("changed")
		wait(2)
		script.Parent.time2.Enabled = true
		wait(0)
		script.Enabled = false
	end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.