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

Why isn't this slowly becoming visilble?

Asked by 9 years ago

I want it so that it will slowly become visible. Unfortunately, it's not doing that.

-- If you give this a thumbs down, please post a comment on WHY you gave it a thumbs down. Thank you--

here is the scripts

while true do
    wait(5)
    if script.Parent.Transparency == 1 then
        wait(5)
        script.Parent.Transparency = 0.9
        wait(5)
    end
end
while true do
    wait(5)
    if script.Parent.Transparency == 0.9 then
        wait(5)
        script.Parent.Transparency = 0.8
        wait(5)
    end
end
while true do
    wait(5)
    if script.Parent.Transparency == 0.8 then
        wait(5)
        script.Parent.Transparency = 0.7
        wait(5)
    end
end
while true do
    wait(5)
    if script.Parent.Transparency == 0.7 then
        wait(5)
        script.Parent.Transparency = 0.6
        wait(5)
    end
end

etc.You get the point, Thank you

0
If you give this a thumbs down, please post a comment on WHY you gave it a thumbs down, Thank you yogipanda123 120 — 9y

2 answers

Log in to vote
1
Answered by 9 years ago

For GUIs

fade = script.Parent

function fade()
    for i = 1, 0, -0.05 do
        wait()
        fade.BackgroundTransparency = i --I explain this below this script
    end
end


wait(3)
fade()

BackgroundTransparency is used for the transparency of the frame/textlabel/textbutton/textbox 's background. TextTransparency is the same thing, but doesn't change the background, it changes the text. Please specify if the thing you are fading in is a frame,textlabel ect. One last thing, while true do is used for repeating the script over and over. Remember, PUT THIS GUI SCRIPT IN A LOCALSCRIPT. Please accept if this helps!

For Parts/Bricks

game.Workspace.Part.Transparency = 1
wait(0.1)
game.Workspace.Part.Transparency = 0.9
wait(0.1)
game.Workspace.Part.Transparency = 0.8
wait(0.1)
game.Workspace.Part.Transparency = 0.7
wait(0.1)
game.Workspace.Part.Transparency = 0.6
wait(0.1)
game.Workspace.Part.Transparency = 0.5
wait(0.1)
game.Workspace.Part.Transparency = 0.4
wait(0.1)
game.Workspace.Part.Transparency = 0.3
wait(0.1)
game.Workspace.Part.Transparency = 0.2
wait(0.1)
game.Workspace.Part.Transparency = 0.1
wait(0.1)

This script should be in a regular script. This script is to fade out. To fade in, use:

game.Workspace.Part.Transparency = 0.1
wait(0.1)
game.Workspace.Part.Transparency = 0.2
wait(0.1)
game.Workspace.Part.Transparency = 0.3
wait(0.1)
game.Workspace.Part.Transparency = 0.4
wait(0.1)
game.Workspace.Part.Transparency = 0.5
wait(0.1)
game.Workspace.Part.Transparency = 0.6
wait(0.1)
game.Workspace.Part.Transparency = 0.7
wait(0.1)
game.Workspace.Part.Transparency = 0.8
wait(0.1)
game.Workspace.Part.Transparency = 0.9
wait(0.1)
game.Workspace.Part.Transparency = 1

Remember, you do not need multiple scripts for one gui/part. Just use one.

Ad
Log in to vote
0
Answered by 9 years ago

You dont need a lot of scripts to run a transparency script... Example This is 1 non-local script.

for i=1,0,-0.1 do
wait(0.01)
script.Parent.Transparency=i
end
0
But when I did one big script, NONE of it worked, while with multiple scripts, at least the first one works yogipanda123 120 — 9y
0
Dude your transparency script will lag the server... I edited mine so now look at mine. MessorAdmin 598 — 9y

Answer this question