Only 1 of the 2 things fade while both of the things should fade at the same time
Main Script
local TextModule = require(script.TextModule)
function MakeUIAlive()
TextModule.fadetext(script.Parent.Warn1.ContiuneLabel)
TextModule.FadeIcon(script.Parent.Warn1.HeartIcon)
end
Module Script
local TextModule = {}
function TextModule.fadetext(FlashIcon)
local CurrTrans = 0
while true do
for count = 1,100 do
CurrTrans = CurrTrans + .01
FlashIcon.TextTransparency = CurrTrans
FlashIcon.TextStrokeTransparency = CurrTrans
wait(.01)
end
for count = 1,100 do
CurrTrans = CurrTrans - .01
FlashIcon.TextTransparency = CurrTrans
FlashIcon.TextStrokeTransparency = CurrTrans
wait(.01)
end
end
end
function TextModule.FadeIcon(FlashIcon)
local CurrTrans = 0
while true do
for count = 1,100 do
CurrTrans = CurrTrans + .01
FlashIcon.ImageTransparency = CurrTrans
wait(.01)
end
for count = 1,100 do
CurrTrans = CurrTrans - .01
FlashIcon.ImageTransparency = CurrTrans
wait(.01)
end
end
end
return TextModule
