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

I need Help with making a text overtime shrink?

Asked by 4 years ago

My script is

Script.parent.textlabel.size = 95 Wait(0.1) And goes down by 5 Why will it not work I’m trying to make the text shrink over time

0
The script doesn’t even work Ultrafirewolf0z -47 — 4y
0
You have to put the code in a loop for it to loop Loughdough 291 — 4y
0
Wdym a code? Ultrafirewolf0z -47 — 4y
0
Preferrably, use tweening DeceptiveCaster 3761 — 4y

3 answers

Log in to vote
0
Answered by 4 years ago

Try this:

for i = 1, 0, -0.05 do
    script.Parent.TextLabel.Size = UDim2.new(i, 0, i, 0)
    wait(1)
end

What I wrote here is a loop.

Also, I think that wait(.1) you wrote is too fast so I changed it to a wait(1)

Hope this helped!

Ad
Log in to vote
0
Answered by 4 years ago

you need to put it in a loop if you want it to fade...

for x = 1,0,-.1 do
    script.Parent.TextLabel.Size = Udim2.new(x,0,.5,0)
    wait(.1)
end

this will have the textlabel shrink from filling the whole screen to nothing

0
dude it's the same as my answer TheRealPotatoChips 793 — 4y
0
But I think I've answered before TheRealPotatoChips 793 — 4y
Log in to vote
0
Answered by 4 years ago

I have tested this. Put the script in the Frame that the TextLabel is in. And you used the term 'size'. Size is not a member of a TextLabel. It would be considered 'TextSize'. So I have tested the following script

script.Parent.TextLabel.TextSize = 95 -- Change '95' to the starting text size.
wait(2) -- time before it starts changing
for i = 1,10 do 
script.Parent.TextLabel.TextSize = script.Parent.TextLabel.TextSize - 9.5 -- How much it shrinks each time.
wait(0.5) -- time between each change
end

Answer this question