I've got this in a LocalScript inside a screenGui named Top.
local player = game.Players.LocalPlayer
local TabFrame = player.PlayerGui.Interface.Frame -- This is where the error is occuring
local back = script.Parent.Parent.Parent.Parent.Back
if player.PlayerScripts.TutorialComplete == false or game.Players.LocalPlayer.PlayerScripts.DevMode.Value == true then
local TutNotif = script.TutorialQuery:Clone()
TutNotif.LayoutOrder = back.Order.Value
TutNotif.Parent = script.Parent.Data
back.Notifs[TutNotif.Name].Confirm.MouseButton1Click:Wait()
TutNotif:Destroy()
back.Notifs[TutNotif.Name]:Destroy()
local TutNotif = script.TutorialTask1:Clone()
TutNotif.LayoutOrder = back.Order.Value
TutNotif.Parent = script.Parent.Data
local target = TabFrame["1Broadcasting"].BroadcastSettings.Back.Title
TutNotif.Tab1.Visible = true
target.BackgroundTransparency = 0.5
target.BackgroundColor3 = Color3.fromRGB(0, 124, 20)
target.FocusLost:Wait()
target.BackgroundTransparency = 1
target.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
local target = TabFrame["1Broadcasting"].BroadcastSettings.Back.Desc
TutNotif.Tab1.Visible = false
TutNotif.Tab2.Visible = true
target.BackgroundTransparency = 0.5
target.BackgroundColor3 = Color3.fromRGB(0, 124, 20)
target.FocusLost:Wait()
target.BackgroundTransparency = 1
target.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
local target = TabFrame["1Broadcasting"].BroadcastSettings.Back.Tags
TutNotif.Tab2.Visible = false
TutNotif.Tab3.Visible = true
target.BackgroundTransparency = 0.5
target.BackgroundColor3 = Color3.fromRGB(0, 124, 20)
target.FocusLost:Wait()
target.BackgroundTransparency = 1
target.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
local target = TabFrame["1Broadcasting"].BroadcastSettings.Back.PublicAPI
TutNotif.Tab3.Visible = false
TutNotif.Tab4.Visible = true
target.BackgroundTransparency = 0.5
target.BackgroundColor3 = Color3.fromRGB(0, 124, 20)
end
I get the error
Interface is not a valid member of PlayerGui
but a screenGui named Interface is clearly inside playerGui. I'm completely lost, I've used this same way to get Gui millions of times before without error. What am I doing wrong?
Heres the, relevant, file structure.
StarterGui
? Interface (ScreenGui)
? Top (ScreenGui)
? TopBar (Frame)
? Frame (Frame)
? UIListLayout (UIListLayout)
? Frame (Frame)
? Notifs (ImageButton)
? Data (Folder)
? Tutorial (This script)
? Alarm (ImageLable)
Its the same in PlayerGui as well.
