So I have this script where you hit a brick, it checks if the humanoid hp is 0, then fades out.
The problem is I can’t find any way to make it fade back in.
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
if hit.Parent.Humanoid.Health == 0 then
local gui = game.ReplicatedStorage:WaitForChild("Black"):Clone()
gui.IgnoreGuiInset = true
gui.Black.BackgroundTransparency = 1
gui.Parent = player.PlayerGui
local toTween = gui.Black
local tweenInfo = TweenInfo.new()
local goal = {}
goal.BackgroundTransparency = 0
local tween = game:GetService("TweenService"):Create(toTween, tweenInfo, goal)
wait(1)
tween:Play()
end
end
end)