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

I need Help with making a text overtime shrink?

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

4 comments

0

The script doesn’t even work

0

You have to put the code in a loop for it to loop

0

Wdym a code?

0

Preferrably, use tweening

3 answers

✓ Accepted answer

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!

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

2 comments

0

dude it's the same as my answer

0

But I think I've answered before

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

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