Help for text setup

function drawTxt(x,y ,width,height,scale, text, r,g,b,a)
SetTextFont(0)
SetTextProportional(0)
SetTextScale(scale, scale)
SetTextColour(r, g, b, a)
SetTextDropShadow(0, 0, 0, 0,255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry(“STRING”)
AddTextComponentString(text)
DrawText(x - width/2, y - height/2 + 0.005)
end

Citizen.CreateThread(function()
while true do
Wait(0)
drawTxt(0.177, 0.239, 0.25, 0.03, 0.40,“Hello World!”,255,255,255,255)
end
end)

I have made this .lua text test. Its work fine, but how can I make it ‘fade out’ again after 5 sec. Hope for help :relaxed:.

maybe something like that :

urtime = 0
while urtime != 5 do
Wait(0)
drawTxt(0.177, 0.239, 0.25, 0.03, 0.40,“Hello World!”,255,255,255,255-urtime*51,)
Wait(1000)
urtime++
end

Thanks I will try that :relaxed: