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: How would I speed this up???

Previous Thread :: Next Thread 
Club24Hour is not online. Club24Hour
Joined: 23 Oct 2011
Total Posts: 1795
05 Apr 2014 12:08 AM
for i = 1,100 do
with.Transparency = with.Transparency + 0.01
wait()
Report Abuse
yurhomi10 is not online. yurhomi10
Joined: 10 Dec 2008
Total Posts: 13886
05 Apr 2014 12:09 AM
change the wait(0.01)
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Apr 2014 12:09 AM
Try doing:
while true do
wait(.1)--Really Fast Set to 5 for really slow
with.Transparency = with.Transparency +0.01
end
Report Abuse
Club24Hour is not online. Club24Hour
Joined: 23 Oct 2011
Total Posts: 1795
05 Apr 2014 12:10 AM
I have tried, but it still goes same pace
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Apr 2014 12:11 AM
What is with? Is this not the full script?
Report Abuse
Club24Hour is not online. Club24Hour
Joined: 23 Oct 2011
Total Posts: 1795
05 Apr 2014 12:12 AM
with is just a GUI in my game, I have a statement saying what it is above it, I just didnt add it
Report Abuse
Club24Hour is not online. Club24Hour
Joined: 23 Oct 2011
Total Posts: 1795
05 Apr 2014 12:13 AM
this is full script--

function onClick()
with = script.Parent.Parent.withdraw
while true do
wait(.1)--Really Fast Set to 5 for really slow
with.Transparency = with.Transparency +0.01

wait(1)

GUI = script.Parent
GUI:TweenPosition(UDim2.new(0.600000024, 0, 0.125, 0))
end

end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Apr 2014 12:14 AM
function onClick()
with = script.Parent.Parent.withdraw
repeat
wait(.1)
with.Transparency = with.Transparency +0.01
until with.Transparency == 1

wait(1)

GUI = script.Parent
GUI:TweenPosition(UDim2.new(0.600000024, 0, 0.125, 0))
end

end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
Club24Hour is not online. Club24Hour
Joined: 23 Oct 2011
Total Posts: 1795
05 Apr 2014 12:17 AM
Thanks, but now it doesn't change the position of parent
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
05 Apr 2014 12:18 AM
wait() is the smallest amount a script can wait... Not wait(.1).
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Apr 2014 12:19 AM
Oh XD I gotta learn what wait() means XD
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
05 Apr 2014 12:21 AM
wait(time)

Basically it makes the script wait the amount of seconds you put in the parentheses, before continuing on.
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Apr 2014 12:21 AM
Which is 0 when you do wait()
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
05 Apr 2014 12:24 AM
It's not 0, it's the very smallest amount of time the script is allowed to wait using the wait() function, before becoming 0.
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
05 Apr 2014 12:26 AM
function onClick()
with = script.Parent.Parent.withdraw

function transChange(tms)
i=1
for i=1, tms do
with.Transparency = with.Transparency +0.01
wait(0.1)
end
end

while true do
transChange(100)
wait(1)

GUI = script.Parent
GUI:TweenPosition(UDim2.new(0.600000024, 0, 0.125, 0))
end

end
script.Parent.MouseButton1Click:connect(onClick)
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