[Plugin] - Cloning Instance in Script - [SOLVED]

Keeping it simple and clear. How would I clone an instance in my plugin script? If I try to do this it would throw an error even with WaitForChild and FindFirstChild used. Nothing seems to work. What i’m trying to do is just copying an ScreenGui just an example in my plugin script however this shows in the output.

With WaitForChild

Without WaitForChild

1 Like

Seems like you saved it as a .lua file, which is just the script by itself.
You need to save it as an .rbxm file instead

1 Like

is the screen GUI stored inside the lua.script?

How would I save it as a .rbxm file instead of an .lua file?

and yes it is stored in the plugin script.

Place the script in a folder then save the folder. Remember to delete the .lua one!

Quick question: Save to Roblox or Save to File?

user_ suggests you saved it as a Local Plugin

alright. i will test this to see if it works.

Can you show the script of the plugin?
Maybe its because your using a lua file, and it can’t get the GUI.

i saved it as a rbxm file even with the screen gui, script, folder, etc. but it didn’t work

Did you save it like this?
Screenshot (11830)

yes i did am i suppose to do all or just the folder? i did all. didn’t work.

Only select the folder, selecting all of them would have made it save like this instead.
Screenshot (11833)

Here’s the plugin code:

Also i’m saving the folder as an rbxm folder as a local plugin. Is that wrong?

no, that should be right
Could you toggle Plugin Debugging Enabled in your studio settings? It should show a service called PluginDebugService after, which is where all the local plugins themselves will be. Then review the hierarchy of this plugin to see if anything looks off.

Is there something wrong with this or no?

1 Like

Well I don’t see anything wrong with the code provided, along with that hierarchy. Do the errors still show up in output?