first of all yes, i do some searching and found these post:
- Lacking capability Plugin error
- Inserting Models via a Script Fails & Returns Error The current thread cannot call 'GetObjects' (lacking capability Plugin)
- How do I do this?
but, it doesnt seem to solve my problem at all.
my problem is, i keep getting this error:
when trying to set a Frame
Parent to plugin widget
The script is:
local UI = plugin:CreateDockWidgetPluginGui(
'System Visualizer',
DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Top,
true,
true,
500,
100,
workspace.Camera.ViewportSize.X,
workspace.Camera.ViewportSize.Y
)
)
local function refresh()
local GetSelection: {Instance} = Selection:Get()
if #GetSelection > 0 and #GetSelection < 2 then
if GetSelection[1]:IsA('ModuleScript') then
Module = require(GetSelection[1])
else
warn('[Client]: Must Be A ModuleScript')
end
end
if not Module then return end
if LastFrame then
LastFrame:Destroy()
LastFrame = nil
end
local Frame = Module.Init() -- It will return a frame from my module script
if not Frame then
warn('[Client]: Must Return An Instance From ModuleScript')
else
Frame.Parent = UI -- The eror occur here, when i try to set the frame parent to plugin widget
LastFrame = Frame
end
end
RefreshBtn.MouseButton1Click:Connect(refresh) -- Image button
i hope it will make some sense any help is appreciated