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
 

Re: Script

Previous Thread :: Next Thread 
Tomboking is not online. Tomboking
Joined: 01 Nov 2012
Total Posts: 461
23 Dec 2014 04:22 PM
What script line is it to stop a script from running half way through without putting remove()?
Report Abuse
golfercab is not online. golfercab
Joined: 26 Sep 2011
Total Posts: 714
23 Dec 2014 04:33 PM
if it is a loop such as for i,v in pairs () do .... or a repeat untill then inside the loop add the word "break" and it will exit the loop and continue on. Now, if you want the script to pause at a certain part until something happens then I would do something such as

repeat
wait(1)
until ... maybe add a bool value in the workspace or inside a model the script is in, where ever so that you can change it and the script will check, see that its value matches the value in the "until" part of this loop and it will continue.

also, i thought remove() was an outdated version of destroy() which deletes an object and all of its children. If this confuses you or it doesn't help, please give more details about the situation you are in.
Report Abuse
Tomboking is not online. Tomboking
Joined: 01 Nov 2012
Total Posts: 461
23 Dec 2014 11:56 PM
So say I had this:

h.Health = h.Health +1
wait(0.025)
h.Health = h.Health +1
wait(0.025)
-----------
h.Health = h.Health +1
wait(0.025)
h.Health = h.Health +1

How could I stop the character from healing half way through where I've put the dashes?
Report Abuse
Tomboking is not online. Tomboking
Joined: 01 Nov 2012
Total Posts: 461
23 Dec 2014 11:58 PM
Sorry I mean pause so it can carry on healing the character later.
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
24 Dec 2014 12:08 AM
like golfer said, you can type in:
"repeat wait() wait until" and put a condition
or you can disable the script:
script.Disabled = true
or you can use "break" to stop the loop if you have one.
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
24 Dec 2014 12:15 AM
Well remove and destroy have differenet functions

Destroy is better than remove though (For most purposes)
Report Abuse
golfercab is not online. golfercab
Joined: 26 Sep 2011
Total Posts: 714
24 Dec 2014 01:27 AM
you could have a boolvalue in the player and have a loop

while (boolvalue) == true do
wait(#)
--healing line of code in here
end
Report Abuse
Tomboking is not online. Tomboking
Joined: 01 Nov 2012
Total Posts: 461
27 Dec 2014 12:36 AM
So could I put:

"if h.MaxHealth then script.Disabled = true"

Would that work?
Report Abuse
golfercab is not online. golfercab
Joined: 26 Sep 2011
Total Posts: 714
27 Dec 2014 08:54 AM
idk, I would do

if h.Health == h.MaxHealth then

end

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