generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

@LCPLgeek

Previous Thread :: Next Thread 
overkill99 is not online. overkill99
Joined: 06 Dec 2008
Total Posts: 2821
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
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
11 Oct 2011 01:57 AM
Free model script, We dont fix Free models.
Report Abuse
overkill99 is not online. overkill99
Joined: 06 Dec 2008
Total Posts: 2821
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
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
11 Oct 2011 03:58 AM
Its a free model script because I used this kind of script.
Report Abuse
overkill99 is not online. overkill99
Joined: 06 Dec 2008
Total Posts: 2821
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 is not online. 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
overkill99 is not online. overkill99
Joined: 06 Dec 2008
Total Posts: 2821
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 is not online. LCPLgeek
Joined: 28 Dec 2009
Total Posts: 2770
11 Oct 2011 05:13 AM
Can you make it a model?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image