Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my plugin script not working?

Asked by 10 years ago

You see, I want to create my first plugin. So i went to tutorials and went to the link but i couldn't copy an image, so I went and created my own 16x16. then, I copied the script they gave and made a little bit of edits. here is my script:

local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar("Test Plugin")
local button = toolbar:CreateButton(
    "", -- The text next to the icon. Leave this blank if the icon is sufficient.
    "Click to do nothing :P", -- hover text
    "icon.png" -- The icon file's name. Make sure you change it to your own icon file's name!
) button.Click:connect(function()
game.Soundscape:ClearAllChildren()
end)

There was 1 error message at line 1 saying pluginmanager is deprecated.

thanks for reading! If you want, im new to plugins so you could explain some stuff in your answer!

1
Completely remove the first line. It's not needed anymore. 'plugin' is a global variable for plugins (like how script is a variable for scripts). Also, POST the error, don't just say there was an error. Tkdriverx 514 — 10y
0
k. TroytheDestroyer 75 — 10y

Answer this question