Here is what i have tried
PluginManager() :CreatePlugin() :CreateToolbar("Make new part plugin") :CreateButton( "Make new part", "Click this button to make a part", "IconName.png" ).Click:connect(function() game.Instance = game.Instance.new("Part", workspace) end)
I'm not familiar with plugins. However, I did notice some errors on line 9.
First, you should not make your variable game.Instance
. On top of that, Instance is not a child of game. It is a base class for all objects in game hierarchy. Here's how a part should be created:
local part = Instance.new("Part",workspace)
I hope i helped!