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

I tried making a fading GUI, and doesn't work?

Asked by
Tisiy 0
6 years ago
for loop = 1, 10 do
game.StarterGui.ScreenGui.Fade2.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end

Tried that^ didn't work.

0
use tweenservice AttentionHog 70 — 6y
0
I did, local player = game.Players.LocalPlayer local pgui = player:WaitForChild('PlayerGui') for loop = 5, 500 do pgui.ScreenGui.Fade2.BackgroundTransparency = loop/500 game:GetService("RunService").Stepped:Wait() end Tisiy 0 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

You’re trying to change the GUI in StarterGui, that’s why. You need to change it in a player’s PlayerGui for it to work.

Here’s a fixed version (Assuming you’re using a localscript) :

for loop = 1, 10 do
game.Players.LocalPlayer.PlayerGui.ScreenGui.Fade2.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end
Ad
Log in to vote
0
Answered by 4 years ago

This is for a simple script:

wait(10) -- Use any numbers 
script.Parent.Transparency = 0.5
wait(10) 
script.Parent.Transparency = 1
0
this is not for local script blitzvfire -5 — 4y
0
you can figure it out yourself ;D blitzvfire -5 — 4y

Answer this question