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

How could I improve my script for make a textlabel shrink?

How could I improve my script for shrinking a text

Wait(23) Script.parent.textlabel.textsize = 95 Wait(0.1) Script.parent.textlabel.textsize = 90 Wait(0.1) Script.parent.textlabel.textsize = 85 Wait(0.1) Script.parent.textlabel.textsize = 80 Wait(0.1) Script.parent.textlabel.textsize = 75 Wait(0.1) Script.parent.textlabel.textsize = 70 Wait(0.1) Script.parent.textlabel.textsize = 65 Wait(0.1)

4 comments

0

Using a for loop will allow you to simplify your code https://developer.roblox.com/en-us/articles/Roblox-Coding-Basics-Loops

0

So does it work tho

0

This is the same script I used for a super cool fade affect on my text

0

How would I make a loop like this?

1 answer

✓ Accepted answer

Personally, my opinion for this is to use a for loop.

To improve this code, I would do

wait(23)
for i = 95,65,-5 do
	script.Parent:WaitForChild("textlabel").textsize = i
	wait(.1)
end

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