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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Script is Running Very Slowly

Previous Thread :: Next Thread 
magicyguy is not online. 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 is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
26 Mar 2013 10:56 AM
What does cleanup do?
Report Abuse
Colonol7777 is not online. Colonol7777
Joined: 14 May 2012
Total Posts: 101
26 Mar 2013 12:01 PM
At the end of the script put
"script.parent.RUN.VERY.DAMN.FAST
Report Abuse
Looah is not online. 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
MainDirectory is not online. MainDirectory
Joined: 20 Dec 2012
Total Posts: 1834
26 Mar 2013 12:26 PM
^ nope hes right bro.
Report Abuse
magicyguy is not online. 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
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