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

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

Asked by 5 years ago

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)

0
Using a for loop will allow you to simplify your code https://developer.roblox.com/en-us/articles/Roblox-Coding-Basics-Loops ForeverBrown 356 — 5y
0
So does it work tho Eyelesstiamat 7 — 5y
0
This is the same script I used for a super cool fade affect on my text Eyelesstiamat 7 — 5y
0
How would I make a loop like this? Eyelesstiamat 7 — 5y

1 answer

Log in to vote
0
Answered by
rexhawk 222 Moderation Voter
5 years ago

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
Ad

Answer this question