So, I want to tween the transparency of a frame and it’s children with it.
The error I’m getting it just tweens the background and not all of it’s children.
(which makes sence)
Code (Local Script)
-- Service --
local TweenService = game:GetService("TweenService")
-- Locals --
local TopBar = script.Parent.Parent.Background.TopBar
local BellButton = TopBar.BellButton
local notificationFrame = script.Parent.Parent.Background.notificationFrame
-- Bell Button --
local TweenVisible1 = TweenService:Create(notificationFrame, TweenInfo.new(2), {Transparency=1})
local TweenVisible2 = TweenService:Create(notificationFrame, TweenInfo.new(2), {Transparency=0})
BellButton.MouseButton1Click:Connect(function()
if notificationFrame.Transparency == 0 then
TweenVisible1:Play()
TweenVisible1.Completed:Wait()
TweenVisible1:Pause()
else
TweenVisible2:Play()
TweenVisible2.Completed:Wait()
TweenVisible2:Pause()
end
end)