Plugin is nil on any type of script

Hello developers, I’m currently working on a plugin but I need to test the widget but I have a problem, the plugin global is nil but don’t miss understand, I am passing the plugin global from script to module script, so it should work but just throws an error saying the plugin is nil; I tried to execute the modulescript from InCommand(cmd bar plugin) or from the normal roblox command bar but it doesn’t work

This is the code of the plugin main (only the widget creation part)

return function(_plugin)
    local tweenService = game:GetService("TweenService")

    local minSize = {512, 329}
    local maxSize = {}

    --

    local widgetInfo = {
        Enum.InitialDockState.Float,
        true,
        false,
        672,
        292,
        672,
        292
    }
    
    local objectWidget = _plugin:CreateDockWidgetPluginGui("TabsWidget", widgetInfo)
end
1 Like

Plugin doesn’t work in scripts aside from normal scripts in ServerStorage.

I had the same Error, your modul script inside RS or SSS dosn`t work because a plugin can not run scripts from outside