How to click a gui Button twice and make Button items Transparency again

my script
BButton.MouseButton1Click:Connect(function()
TweenService:Create(CreditFrame, Outti, {ImageTransparency = 1}):Play()
TweenService:Create(CreditFrame.GameDevs, Outti, {TextTransparency = 1}):Play()
TweenService:Create(CreditFrame.xxya, Outti, {TextTransparency = 1}):Play()
TweenService:Create(CreditFrame.Super, Outti, {TextTransparency = 1}):Play()
TweenService:Create(BButton, Outti, {ImageTransparency = 1}):Play()
TweenService:Create(BButton.TextLabel, Outti, {TextTransparency = 1}):Play()
end)

Here’s one implementation of it:

local State = false
BButton.MouseButton1Click:Connect(function()
     State = not State -- Alternate
     Transparency = State and 1 or 0

     TweenService:Create(CreditFrame, Outti, {ImageTransparency = Transparency }):Play()
     TweenService:Create(CreditFrame.GameDevs, Outti, {TextTransparency = Transparency ):Play()
     TweenService:Create(CreditFrame.xxya, Outti, {TextTransparency = Transparency }):Play()
     TweenService:Create(CreditFrame.Super, Outti, {TextTransparency = Transparency }):Play()
     TweenService:Create(BButton, Outti, {ImageTransparency = Transparency }):Play()
     TweenService:Create(BButton.TextLabel, Outti, {TextTransparency = Transparency }):Play()
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.