JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 31 Jan 2017 10:49 AM |
I'm making a search bar plugin, this script works when I test the search bar GUI in a game, but doesn't work as a plugin itself. There's something wrong with this script but I have no idea what...
s = script.Parent s.MouseButton1Click:connect(function() local res = s.Parent if res.location.Text == "Instance" then Instance.new(res.title.Text).Parent = workspace local c = res.Parent:GetChildren() for i=1,#c do if c[i].Name ~= "exresult" then c[i]:Destroy() end end end end) |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 31 Jan 2017 10:51 AM |
| Plugins work differently than normal scripts. Search up a tutorial on how to make plugins. |
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 31 Jan 2017 10:53 AM |
| I can't find anything relating to GUIs. The rest of my 484 line script works absolutely fine and I've replaced everything labelled "StarterGui" with "CoreGui". Is there a limit to the amount of scripts that can be used because it doesn't appear that this script is even being accessed in the first place. |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 31 Jan 2017 10:54 AM |
| I've never really worked with a Plugin but my guess would be that it all has to be in one script. |
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 31 Jan 2017 10:57 AM |
| Right, I'm getting somewhere now that I've put everything into one script. Now I'm just being given the incorrect object but I'm sure I can fix that easily. Thanks for your help. |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
| |
|