magicyguy
|
  |
| Joined: 31 Jul 2008 |
| Total Posts: 360 |
|
|
| 26 Mar 2013 08:56 AM |
I made the script for a crafting GUI, but there is a noticeable delay when using it. Can anyone tell me why this is running slowly?
function onClick(mouse) IngOne = script.Parent.Parent.Ing1.Text IngTwo = script.Parent.Parent.Ing2.Text if IngOne == "Wood" and IngTwo == "" then P = game.Debris.Club:clone() P.Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack CleanUp() elseif IngOne == "Wood" and IngTwo == "Stone" then P = game.Debris.Hatchet:clone() P.Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack CleanUp() else print 'oops' script.Parent.Parent.Ing1.Text = "" script.Parent.Parent.Ing2.Text = "" for G,g in pairs(script.Parent.Parent:GetChildren()) do if g.Value ~= nil then g.Value.Value = false end end end |
|
|
| Report Abuse |
|
|
POC0bob
|
  |
| Joined: 20 Feb 2010 |
| Total Posts: 549 |
|
| |
|
|
| 26 Mar 2013 12:01 PM |
At the end of the script put "script.parent.RUN.VERY.DAMN.FAST |
|
|
| Report Abuse |
|
|
Looah
|
  |
| Joined: 22 Feb 2013 |
| Total Posts: 922 |
|
|
| 26 Mar 2013 12:26 PM |
^ NO
Lua, a programming languange what is used for scripting. |
|
|
| Report Abuse |
|
|
| |
|
magicyguy
|
  |
| Joined: 31 Jul 2008 |
| Total Posts: 360 |
|
|
| 26 Mar 2013 02:38 PM |
| Cleanup goes through and resets a large part of the GUI, but the part running slowly is the section. The rest is fine. |
|
|
| Report Abuse |
|
|