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 » Scripters
Home Search
 

Which one's better?

Previous Thread :: Next Thread 
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
12 Sep 2015 06:25 PM
Which one is better for a hold down script?

A.) Make a boolvalue, make it true.

local a = boolvalue.Value

while a do
--script
wait()
end

In another script, you make a script check if the player let go, if they did the value because false.

When the boolvalue's value becomes false, the loop stops.

or

B.) Make a boolvalue, make it true

repeat
-- script
until
boolvalue.Value = false

Which do you prefer, or is there a better way of doing it?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
12 Sep 2015 06:29 PM
Describe the context.
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
12 Sep 2015 09:49 PM
Let's say:

While holding down the mouse button, parts keep spawning.

But when you let go, it stops.
Report Abuse
Foreboding is not online. Foreboding
Joined: 22 Aug 2010
Total Posts: 19154
12 Sep 2015 10:11 PM
Lag af

They should get destroyed after like 2 seconds if more then 20 has spawned


http://www.roblox.com/Shots-Fired-item?id=168209364 Shots fired, ready for the war.
Report Abuse
OakBerry is not online. OakBerry
Joined: 18 May 2015
Total Posts: 407
12 Sep 2015 10:18 PM
It was just an example.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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