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)