Please could anyone help?
- Thanks DrJawsh
Please could anyone help?
Basically, a plugin works exactly like a normal script, except that it runs each time you open a place it studio, and you've got access to the plugin global variable, wich unlocks you more possibilities. For example, you can get access to the mouse like this :
mouse = plugin:GetMouse()
mouse.Button1Down:connect(function() print("Clicked") end)
To publish and test a plugin you've just created, all you have to do is put your script in a model, then right click the model and choose "Publish as plugin". Check out the wiki article if you want to learn more about plugins : http://wiki.roblox.com/index.php?title=Tutorial:Plugins
Try this.
local Plugin = PluginManager():CreatePlugin()
local Bar = Plugin:CreateToolbar('Part Spawner')
local Button = Bar:CreateButton('Part Spawner', 'Spawn a Part', '')
Button.Click:connect(function()
local Part = Instance.new('Part', Workspace)
end)
If needed, feel free to add some of your own code, such as
Part.Anchored = true
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Please look here to begin with, it contains a lot of information about the plugin object itself: http://wiki.roblox.com/index.php?title=Plugin
I am wondering to get it on the hotbar and all like if you click it, it spawns a part.