I know there's a simpler way to do this, but I don't know what to search to get an answer. Here's my script:
01 | local base = game.Workspace.Part |
02 | while true do |
03 | base.Transparency = 0 |
04 | wait(. 1 ) |
05 | base.Transparency = 0.25 |
06 | wait(. 1 ) |
07 | base.Transparency = 0.5 |
08 | wait(. 1 ) |
09 | base.Transparency = 0.75 |
10 | wait(. 1 ) |
11 | base.Transparency = 1 |
12 | wait(. 1 ) |
13 | base.Transparency = 0.75 |
14 | wait(. 1 ) |
15 | base.Transparency = 0.5 |
16 | wait(. 1 ) |
17 | base.Transparency = 0.25 |
18 | wait(. 1 ) |
19 | end |
How can I make this shorter and give it a smoother transition?
TweenService is the probably the best option as far as smoothness
well if you wanna make it shorter and smoother you can do:
01 | local base = game.Workspace.Part |
02 |
03 | repeat |
04 | base.Transparency = base.Transparency + 0.1 |
05 | wait() |
06 | until base.Transparency > = 1 |
07 |
08 | wait(However long) |
09 |
10 | repeat |
11 | base.Transparency = base.Transparency - 0.1 |
12 | wait() |
13 | until base.Transparency < = 1 |