Is there a way I can make this shorter? Is it possible? I tried adding an extra loop but makes it more difficult to read.

local MonsterText = script.Parent.Monster
local ThreatText = script.Parent.Threat
local Background = script.Parent

wait(3)

for i = 1, 0, -0.05 do
	MonsterText.TextTransparency = i
	wait(0.01)
end

wait(2)

for i = 1, 0, -0.05 do
	ThreatText.TextTransparency = i
	wait(0.01)
end

wait(2)

for i = 0, 2, 0.05 do
	MonsterText.TextTransparency = i
	wait(0.01)
end

wait(2)

for i = 0, 2, 0.05 do
	ThreatText.TextTransparency = i
	wait(0.01)
end

wait(2)

for i = 0, 2, 0.05 do
	Background.BackgroundTransparency = i
end

2 comments

0

By shorter do you mean have the loop run at a quicker speed?

0

To shorten the code I mean.