Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am unable to make my GUI slowly fade away. What script will make the GUI fade away?

Asked by
Cowgato 33
2 years ago
local debounce = false

local userinputservice = game:GetService("UserInputService")

userinputservice.InputBegan:Connect(function(input, gameProcessedEvent)

    if not debounce then

        debounce = true

    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.1
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.2
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.3
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.4
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.5
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.6
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.7
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.8
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.9
    wait(1)
    script.Parent.ScreenGui.Frame.BackgroundTransparency = 1
        wait(1)

        wait(10)

        debounce = false

        end

    end)


0
Another GUI Fading script that helped me a lot is this: wait(10) while true do wait (0.06) script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 0.01 if script.Parent.BackgroundTransparency == 1 then end end wait(0.1) script.Parent.Visible = false wackoscar1 0 — 2y

1 answer

Log in to vote
0
Answered by
extrorobo 104
2 years ago

Fading GUI script :

local TweenService = game:GetService('TweenService') local Frame = script.Parent

TweenService:Create( Frame, -- UI object you're tweening, in this case it's Frame TweenInfo.new(2), -- Amount of seconds {BackgroundTransparency = 1} -- Goal ):Play() -- Plays your tween

0
Did not work. Maybe I didn't put it in properly? Cowgato 33 — 2y
0
wait extrorobo 104 — 2y
0
here try this - https://devforum.roblox.com/t/fading-gui-script/1068731. if you like this, please acceot the answer extrorobo 104 — 2y
Ad

Answer this question