for loop = 1, 10 do
game.StarterGui.ScreenGui.Fade2.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end
Tried that^ didn't work.
for loop = 1, 10 do
game.StarterGui.ScreenGui.Fade2.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end
Tried that^ didn't work.
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
This is for a simple script:
wait(10) -- Use any numbers
script.Parent.Transparency = 0.5
wait(10)
script.Parent.Transparency = 1
this is not for local script
you can figure it out yourself ;D
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
use tweenservice
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