Working on a plugin which saves what you type (It's a notepad plugin)
local dockWidget = plugin:CreateDockWidgetPluginGui (
"Notepad - FernandoMacLeod",
DockWidgetPluginGuiInfo.new (
Enum.InitialDockState.Float,
true,
true,
300,
200,
150,
100
)
)
local ui = script:WaitForChild("UI")
local container = ui:WaitForChild("Container")
local body = container:WaitForChild("Body")
local notepad = body:WaitForChild("Notepad")
local errorLabel = body:WaitForChild("Error")
local success = body:WaitForChild("Success")
local savedText = ""
function save ()
plugin:SetSetting("Notepad" .. tostring(game.GameId), notepad.Text)
end
notepad.Parent = dockWidget
dockWidget.Title = "Notepad"
while (game.GameId == 0) do wait(0.3) end
savedText = plugin:GetSetting("Notepad" .. tostring(game.GameId)) or ""
errorLabel.Visible = true
notepad.FocusLost:Connect( save )
Never had this error before whilst testing a plugin. I've tried to look at other threads to do with this issue, but to no avail.
Line causing the error:
local interface = script:WaitForChild("UI")

2 comments
Chipio has pretty good tutorials huh, also you're trying to index a whole UI inside a script, did you mean to do script.Parent? What you're doing is trying to find frames that are descendants of the current script.
I agree, Chipio does have good tutorials. No, I didn't mean to do script.Parent ( even though I've tried that ). The parent of the Gui is inside the scrip, I've always placed my Gui's inside plugin scripts, this is the first time I'm only getting the error now.