-
What do you want to achieve? white screen that fades over time
-
What is the issue? the tween doesnt play and there arent any errors
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i cant find anything about it
local tweenService = game:GetService("TweenService")
local whitescreen = script.Parent:WaitForChild("EggAnimation"):WaitForChild("Whitescreen")
local tweenInfo = TweenInfo.new(
.3, --Time
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0, --Repeat count
false, --Reverse
0 --Delay
)
local tween = tweenService:Create(whitescreen, tweenInfo, {BackgroundTransparency = 0})
game.ReplicatedStorage.HatchEgg.OnClientEvent:Connect(function(pet)
whitescreen.Visible = true
wait(.1)
tween:Play()
wait(2)
whitescreen.Visible = false
end)