I am developing a plugin that shows UI on the screen when opened, but the UI isn’t showing up.
local toolbar = plugin:CreateToolbar("Update")
local functionScriptButton = toolbar:CreateButton("Launch Updater", "", "rbxassetid://15110885598")
functionScriptButton.Click:Connect(function()
if script:FindFirstChild("UpdaterUI") then
script.UpdaterUI.Parent = game:GetService("CoreGui")
else
game.CoreGui:FindFirstChild("UpdaterUI").Parent = script
end
end)
When I try to open the plugin, it returns the error user_UpdatePlugin.lua.Script:8: attempt to index nil with ‘Parent’
How can I fix this and get the plugin to open?
It’s a script for a Studio plugin that runs in the Studio editor. I made one in the past, but unfortunately lost the files and how to make it, and it needs to be interacted with in the Studio editor, so startergui and playergui won’t work.