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

Plugin Script won't work? [NOT COMPLICATED OR LONG] [PLEASE ANSWER]

Asked by 10 years ago

Script:

msg = Instance.new("Message")
local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar("RBAN")
local button = toolbar:CreateButton(
    "RBAN",
    "RBAN", 
    "ico.png" 
)
button.Click:connect(function()
    msg.Parent = game.Workspace
    msg.Text = "RBAN Starting."
    wait(1)
    msg.Text = "RBAN Starting.."
    Wait(1)
    msg.Text = "RBAN Starting..."
    wait(2)
    msg:Destroy()
    wait(1)
function find(Workspace) 
local child = Workspace:getChildren() 
for i=1, #child do 
if child[i].className == "Script" then
child[i]:remove() 
end
end
end
end)

This script is supposed to find any Script and delete it in the workspace. for instance, if i clicked the button, it would delete the 2 scripts i just inserted into the workspace. So basically, when clicked, it deletes all the scripts in the workspace. Also, how would i use a decal as a image for the button instead of using a image from a file?

1 answer

Log in to vote
1
Answered by
Nifer2 174
10 years ago
msg = Instance.new("Message")
local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar("RBAN")
local button = toolbar:CreateButton(
    "RBAN",
    "RBAN", 
    "http://www.roblox.com/asset/?id=145329596" -- To use a decal, upload a decal to ROBLOX or find a decal that you want to use, and simply paste it here instead of using a file. 
)
button.Click:connect(function()
    msg.Parent = game.Workspace
    msg.Text = "RBAN Starting."
    wait(1)
    msg.Text = "RBAN Starting.."
    Wait(1)
    msg.Text = "RBAN Starting..."
    wait(2)
    msg:Destroy()
    wait(1)
function find() 
local child = game.Workspace:GetChildren() -- GetChildren() has a capital g. Before, it was lowercase.
for i=1, #child do 
if child[i].ClassName == "Script" then -- ClassName has a capital c. Before, it was lowercase.
child[i]:Destroy() -- remove() has been deprecated. Use Destroy() like you did earlier.
end
end
end
end)

Your GetChildren() needed a capital g, and your ClassName needed a capital c. To use a decal instead of a file for the icon, simply paste the roblox decal link into the string.

0
Thank you! PyccknnXakep 1225 — 10y
0
Your welcome! Nifer2 174 — 10y
0
Well, that didn't work. I tried it out, but It didnt delete the scripts :/ PyccknnXakep 1225 — 10y
0
I think I fixed it. Can you try the script again? Nifer2 174 — 10y
Ad

Answer this question