Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you check a textlabel's transparency in a local script?

Asked by 5 years ago
Edited 5 years ago

It doesnt seem to update the value at all when I check it in testing but it will appear and never fade away it just goes to delete itself as if transparency 1 = transparency 0. i even tried using a NumberValue to represent the transparency and it didn't update either...

01local text = script.Parent
02 
03--Fade in.
04repeat
05 
06text.TextTransparency = text.TextTransparency - .05
07wait(.1)
08 
09until text.TextTransparency <= 0
10 
11--Wait a little before fading out.
12wait(3)
13 
14--Fade out.
15repeat
View all 25 lines...

1 answer

Log in to vote
0
Answered by
Knqe 23
5 years ago

I suggest using a while loop like this

01local text = script.Parent
02 
03while text.TextTransparency > 0 do
04    text.TextTransparency = text.TextTransparency - .05
05    wait(.1)
06end
07 
08wait(3)
09 
10while text.TextTransparency = text.TextTransparency < 1 do
11    text.TextTransparency = text.TextTransparency + .05
12    wait(.1)
13end
0
i tried this as well didnt work ReallyUnikatni 68 — 5y
Ad

Answer this question