[SOLVED] Button not showing up when i do if script... == 0 then

I had the same issue about the textlabel that is not showing up at all about my game. And it has caused a 10,000 milliseconds lag in the UTC (Not the Ping).

No errors.

Not even a single one.

And now, it’s the TextButton not showing up, even tought it has if script… == 0 then.

Video:

LocalScript:

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.OpenMenu.Text = "Open Menu"
end)

if script.Parent.Parent.Title.TextTransparency == 0 then
	script.Parent.Visible = false
else
	script.Parent.Visible = true
end

Or this:

script.Parent.Enabled = true -- enable = true
script.Parent.Parent["Stage Transfer"].Enabled = false -- Why the stage transfer ? beacuse i don't wanna see it without any reason before playing the game

script.Parent.MenuFrameLoadingPage.Title.Font = "SourceSansBold" -- font title

script.Parent.MenuFrameLoadingPage.Title.Text = "Welcome To Cyril's Difficulty Chart Obby !" -- text title
script.Parent.MenuFrameLoadingPage.Title.Visible = false -- invisible title

script.Parent.MenuFrameLoadingPage.Play.Visible = false

wait(1.7) -- waittime

script.Parent.MenuFrameLoadingPage.Title.Visible = true -- visible Title
script.Parent.MenuFrameLoadingPage.Title.TextTransparency = 1 -- text invisible Title

if script.Parent.MenuFrameLoadingPage.Title.TextTransparency == 0 then -- only the title of the game will have the texttransparency to 0
	script.Parent.MenuFrameLoadingPage.Play.Visible = true  -- make the button visible (which might cause the problems)
else -- else
	script.Parent.MenuFrameLoadingPage.Play.Visible = false -- make the button invisible because if the line 39 haven't reached the 0 (which might cause the problem)
end -- end

if script.Parent.MenuFrameLoadingPage.Title.TextTransparency >= 0.01 then
	script.Parent.MenuFrameLoadingPage.Play.Visible = false
else
	script.Parent.MenuFrameLoadingPage.Play.Visible = true
end

Also why did I almost did a comment in every single line in this script ? Sorry that was ultra weird, the grammar (Or something like that?).

So yeah guys, any help is appreciated.

1 Like

Try using :GetPropertyChangedSignal() instead.

local text: TextLabel = script.Parent.Parent.Title

text:GetPropertyChangedSignal("TextTransparency"):Connect(function()
	if text.TextTransparency == 0 then
		script.Parent.Visible = false
	end
end)
1 Like

Don’t forgot that i have the thing on the up 4 lines, okay ?

Oh wow, this really helped me, and also you did false, but i did true.