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

Why is this script not making the textlabels dissappear?

local chlg = script.Parent.chlg
local start = script.Parent.start
local B1 = script.Parent.changelog["1"]
local B2 = script.Parent.changelog["2"]
local B3 = script.Parent.changelog["3"]
local tp = script.Parent.changelog.chlg

chlg.MouseButton1Click:connect(function()
	chlg.Confirm:Play()
	for i = 1,1000 do
		B1.TextTransparency = B1.TextTransparency + .01
		B2.TextTransparency = B1.TextTransparency + .01
		B3.TextTransparency = B1.TextTransparency + .01
		tp.TextTransparency = tp.TextTransparency + .01
		wait()
	end
	script.Parent.changelog.Visible = false
	wait(2)
	script.Parent.Handler.Disabled = false
	script.Disabled = true
end)

This script is supposed to make the textlabels dissapear with a click of a button. The button works, but the rest doesn't. Here's the script that makes them appear for reference:

local chlg = script.Parent.chlg
local start = script.Parent.start
local B1 = script.Parent.changelog["1"]
local B2 = script.Parent.changelog["2"]
local B3 = script.Parent.changelog["3"]
local tp = script.Parent.changelog.chlg

game.Players.LocalPlayer.PlayerGui:SetTopbarTransparency(0)

chlg.MouseEnter:connect(function()
	chlg.Click:Play()
end)
chlg.MouseLeave:connect(function()
	chlg.Click2:Play()
end)
start.MouseEnter:connect(function()
	start.Click:Play()
end)
start.MouseLeave:connect(function()
	start.Click2:Play()
end)

chlg.MouseButton1Click:connect(function()
	chlg.Confirm:Play()
	script.Parent.changelog.Visible = true
	for i = 1,1000 do
		B1.TextTransparency = B1.TextTransparency - .01
		B2.TextTransparency = B1.TextTransparency - .01
		B3.TextTransparency = B1.TextTransparency - .01
		tp.TextTransparency = tp.TextTransparency - .01
		wait()
	end
	wait(2)
	script.Parent.Handler2.Disabled = false
	script.Disabled = true
end)

9 comments

0

First of all, is it in a localscript?

0

Yes

0

also why is it in a for loop? would you not want it to just make the textlabels disappear completely, or is it a loop where, they enable then disable continuously?

0

I want them to fade out in that script, but it wont.

0

I see what you mean now, I made a model test of your script to see what the problem could be but there is no error being shown in the output. My only recommendation is doing it old school, but I'm sure you wouldn't want to spend a long time scripting. I have to go soon anyway. I hope your question gets answered. :)

0

Thanks.

0

wait, do you want it to disappear on click?

0

Yes

0

Is your appear script working?

2 answers

Will this work for you?

local chlg = script.Parent.chlg
local start = script.Parent.start
local B1 = script.Parent.changelog["1"]
local B2 = script.Parent.changelog["2"]
local B3 = script.Parent.changelog["3"]
local tp = script.Parent.changelog.chlg

game.Players.LocalPlayer.PlayerGui:SetTopbarTransparency(0)

chlg.MouseEnter:connect(function()
    chlg.Click:Play()
end)
chlg.MouseLeave:connect(function()
    chlg.Click2:Play()
end)
start.MouseEnter:connect(function()
    start.Click:Play()
end)
start.MouseLeave:connect(function()
    start.Click2:Play()
end)

chlg.MouseButton1Click:connect(function()
    chlg.Confirm:Play()
    script.Parent.changelog.Visible = true
    for i = 0,1, 0.1 do --- changed this
        B1.TextTransparency = B1.TextTransparency = i  --- Changed This
        B2.TextTransparency = B1.TextTransparency = i  --- Changed This
        B3.TextTransparency = B1.TextTransparency = i  --- Changed This
        tp.TextTransparency = tp.TextTransparency = i  --- Changed This
        wait()
    end
    wait(2)
    B1.Visible = false  --- Added this
    B2.Visible = false  --- Added this
    B3.Visible = false  --- Added this
    script.Parent.Handler2.Disabled = false
    script.Disabled = true
end)

I hope this will work for you!

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