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: Do nothing?

Previous Thread :: Next Thread 
jonman11 is not online. jonman11
Joined: 30 Jan 2010
Total Posts: 3386
18 Aug 2013 03:11 PM
I have an if statement in a script, so how do I make the else do nothing?

Here's the line of code:

function checkForRaiders()
if script.Parent.TermOwner.Value == "Raiders" == false then
startCapCountdown()
else
end
Report Abuse
blimp80 is not online. blimp80
Joined: 22 May 2011
Total Posts: 278
18 Aug 2013 03:13 PM
You're missing an "end" and put "return" under "else".
Report Abuse
jonman11 is not online. jonman11
Joined: 30 Jan 2010
Total Posts: 3386
18 Aug 2013 03:14 PM
Is that how you do nothing?
Report Abuse
blimp80 is not online. blimp80
Joined: 22 May 2011
Total Posts: 278
18 Aug 2013 03:15 PM
Pretty much, you could even have it print something in the output to check.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
18 Aug 2013 03:17 PM
"if script.Parent.TermOwner.Value == "Raiders" == false then"
If its equal to "Raiders" equal to false?
Just put:
"if script.Parent.TermOwner.Value ~= "Raiders" then"
Report Abuse
bobulator is not online. bobulator
Joined: 28 Sep 2008
Total Posts: 171
18 Aug 2013 03:49 PM
jonman, you dont actually have to have the else, you can just have


if script.Parent.TermOwner.Value == "Raiders" == false then
--do stuff
end
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