How to gradually increase a GUI's transparency

Hey there! So I’m making a speed coil ability for my game. It will have a red gui on the screen to represent the speed. When used, it will slowly appear on screen, then slowly disappear after 5 seconds. I did something similar with the FOV. I’m pretty new to this kind of topic so I made it in a pretty scuffed way. Here’s the script:

local Plr = game.Players.LocalPlayer
local screen = script.Parent.Parent.Parent.RedScreen
Plr:GetMouse().KeyDown:Connect(function(Q)
	if Q == "q" then
		
		game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {FieldOfView = 90}):Play()

		game:GetService("TweenService"):Create(screen, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {BackroundTransparency = .65}):Play()
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 22       
		workspace.Sounds.SpeedCoil.SpeedCoilUse:Play()
		wait(.1)
		workspace.Sounds.SpeedCoil.CoilSound:Play()
		wait(5)
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 14
		
		game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {FieldOfView = 70}):Play()
		game:GetService("TweenService"):Create(screen, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {BackroundTransparency = 1}):Play()
	end
end)

ERROR: TweenService:Create no property named ‘BackroundTransparency’ for object 'RedScreen’

I’d bet that I need to use something else other than Tween Service, but I’m not sure. If someone could help me, that would be great! (I will give more information if needed)

BackgroundTransparency. Not backround transparency.

3 Likes

Oh. It was just a spelling mistake?

3 Likes

Mhm :grinning: . It was just a misspell.

Sweet! Thanks. Would you like to see what it looks like?

1 Like

Sure!

I’m expecting it to be great

[robloxapp-20220918-1549064.wmv|attachment](upload://pbS1n52J64d1BKMYmFM8nYVEXXO.wmv) (1.9 MB)

Wait is there an easier way to post videos here?

1 Like

Yeah.

(Char limitsssssssssssssssss)

robloxapp-20220918-1549064.wmv

There we go. The quality will be pretty bad because it’s being recorded on roblox’s built in recorder so yeah.

1 Like

That looks cool!

I recommend making its transparent a littlee bit more transparent, like around 0.4 .

Good idea. By the way I made a new recording on OBS so that might be higher quality

1 Like

Dang it obs won’t work. I guess I’ll just use roblox’s recorder again, this time with a bit of gameplay in the map

1 Like

robloxapp-20220918-1602140.wmv

Here’s the final product, I will lower the transparency like you said!

1 Like