Error with my plugin on studio start

I am creating a plugin but when I first load studio my plugin gives this error:

Object is not a valid member of Script "user_Main.lua.Script"

I think the error is because it didn’t the plugin didn’t finish loading and I also used :WaitForChild

Also when I test my game in studio my plugin gives the same error.

Any help, would be awesome!

1 Like

We need the script to provide help.

Your issues here is as the error say, the value Object isn’t existing inside your script.

But the value exists and my whole plugin runs
This is where it is giving an error:

if not plugin or game:GetService("RunService"):IsRunning() then return end

-- QuickBuild
local QuickBuild = script.Parent

-- Modules Folders
local ObjectModules = script.Object

It is giving the error in the first few lines but my plugin still works completely fine.

The reason I’m not giving my whole script is because one time I did and someone copied it entirely

Is Object a child inside the script?

Also note that anyone can get the code from your script/plugin by loading it with his assets ID

Yes it is a child

char limit()

What’s the error when your using :WaitForChild(“Object”) ?

The same error

Here is my explorer:
image
Main is where I am calling script.Object

1 Like

Are you creating the plugin from the main script or from the Folder that contain the Main script?

The folder that contains the main script

1 Like

Then I sadly think that I can’t help you anymore since as for myself, it’s perfectly working


image

You can try to give another name to your file but this should not be the problem.

1 Like

Ok thanks for trying to help though!
Guess someone else might help me

Try selecting all the children of the script when you’re publishing it as a plugin/saving it as a plugin. In the past I’ve found that sometimes it doesn’t save the objects inside the script, instead just saves the parent script. Select the parent script + all the children, THEN right click and save/publish.

Oops I forgot to mention someone already helped me! Thank you all for trying though!