|
| 10 Oct 2011 11:38 PM |
Recently at a friend's place, his "MoreTools" GUI which pops up with 2 GUIs (to raise the opacity) and displays extra tools the user can use.
However, now when the GUI trys to end and close it's functions, it locks up on the screen and can be quite the annoyance.
Here are both the scripts that go with it and their script names in quotations.
"Script:" gui = script.Parent.Tools:clone() active = false
function onSelected() if active == false then active = true gui.Parent = script.Parent.Parent.Parent.PlayerGui end end
function onDeselected() if active == true then active = false gui:remove() gui = script.Parent.Tools:clone() end end
script.Parent.Selected:connect(onSelected) script.Parent.Deselected:connect(onDeselected)
"Put tools in this script" wait(0.1) backpack = script.Parent.Parent.Parent.Backpack
function onToolClicked(tool) for _, v in pairs(backpack:getChildren()) do if v:findFirstChild("MoreTools") ~= nil then v:findFirstChild("MoreTools"):remove() v:remove() end end t = tool:clone() b = Instance.new("BoolValue") b.Parent = t b.Name = "MoreTools" t.Parent = backpack end
for i, v in pairs(script:getChildren()) do if v.className == "HopperBin" then if v.TextureId == "" then gui = Instance.new("TextButton") gui.Parent = script.Parent.WindowFrame.Frame gui.BackgroundColor3 = Color3.new(1/256*17, 1/256*17, 1/256*17) gui.BorderColor3 = Color3.new(1/256*17, 1/256*17, 1/256*17) gui.TextColor3 = Color3.new(1, 1, 1) gui.BackgroundTransparency = 0.25 gui.Position = UDim2.new(0, ((i - 1) % 6) * 100, 0, math.floor((i - 1) / 6) * 100) gui.Size = UDim2.new(0, 100, 0, 100) gui.Text = v.Name gui.MouseButton1Click:connect(function() onToolClicked(v) end) end if v.TextureId ~= "" then gui = Instance.new("Frame") gui.Parent = script.Parent.WindowFrame.Frame gui.BackgroundColor3 = Color3.new(1/256*17, 1/256*17, 1/256*17) gui.BorderColor3 = Color3.new(1/256*17, 1/256*17, 1/256*17) gui.BackgroundTransparency = 0.25 gui.Position = UDim2.new(0, ((i - 1) % 6) * 100, 0, math.floor((i - 1) / 6) * 100) gui.Size = UDim2.new(0, 100, 0, 100) image = Instance.new("ImageButton") image.Parent = gui image.Image = v.TextureId image.Position = UDim2.new(0, 10, 0, 10) image.Size = UDim2.new(0, 80, 0, 80) image.BackgroundTransparency = 1 image.MouseButton1Click:connect(function() onToolClicked(v) end) end end end
To see the functionality of it and what I'm talking about, go to helo119's place at: http://www.roblox.com/Earth-Stories-Civilization-READ-DESC-place?id=11766669 |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2011 01:57 AM |
| Free model script, We dont fix Free models. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2011 03:44 AM |
It's not a free model'd script. Gaz444 gave it to my friend helo119 who gave it to me to fix it after a recent ROBLOX update.
I need help finding the problem with it because I can't seem to find a solution in it. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2011 03:58 AM |
| Its a free model script because I used this kind of script. |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2011 04:03 AM |
Does that mean you can't help me? No it doesn't. There's a reason why it's a Scripting Helpers forum section. And I need help trying to debug this thing.
And lastly, you've used this "KIND" of script before. But not this exact same script that gaz444 designed himself. |
|
|
| Report Abuse |
|
|
LCPLgeek
|
  |
| Joined: 28 Dec 2009 |
| Total Posts: 2770 |
|
|
| 11 Oct 2011 04:09 AM |
| Noticed 1 thing, where did you specify the value tool? |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2011 04:59 AM |
The script appears to automatically define "tool." Which I beleive is a default variable characterizing the tool in which the user can select and interact with.
If I'm wrong then maybe that might've been the issue, but the thing is... It opens up fine... But closes 1 of the 2 GUIs it opens for the opacity increase, and the second one sticks and cannot be removed. |
|
|
| Report Abuse |
|
|
LCPLgeek
|
  |
| Joined: 28 Dec 2009 |
| Total Posts: 2770 |
|
| |
|