I am trying to access a frame in PlayerGui in a local script. It is not working though.
Local script:
local Event = game:GetService("ReplicatedStorage"):WaitForChild("BlackFade")
local Player = game:GetService("Players").LocalPlayer
local theplayer = game.Players.LocalPlayer
local Fade2 = Player.PlayerGui.WhiteFade.tframe
local Info = TweenInfo.new(3)
local tween = game:GetService("TweenService"):Create(Fade2,Info,{BackgroundTransparency=0})
local close = game:GetService("TweenService"):Create(Fade2,Info,{BackgroundTransparency=1})
It says:
WhiteFade is not a valid member of PlayerGui "Players.wes_youtuber.PlayerGui"
Help is appreciated.