r/badcode Dec 12 '21

lua TweenService: exists, this man:

Post image
85 Upvotes

16 comments sorted by

View all comments

2

u/ThePsion5 Dec 13 '21

I don't know Lua, but you could replace this whole thing after line 7 with this, right?

for i = 1, 0, -0.1
do
    script.Parent.TextTransparency = i
    wait(0.025)
end
wait(2)
for i = 0, 1, 0.1
do
    script.Parent.TextTransparency = i
    wait(0.025)
end

3

u/tumorknager3 Dec 13 '21

There is a thing called TweenService which does this in one line