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: I need help with this very simple script.

Previous Thread :: Next Thread 
plesantly8 is not online. plesantly8
Joined: 24 Feb 2010
Total Posts: 136
06 Jul 2012 04:13 PM
What is wrong with this?

-- Made by Plesantly8 --

if script.Parent.Throttle~=0 then
script.Parent.Parent.InUse = true
elseif script.Parent.Parent.InUse = false
end

It says InUseChanger:4: 'then' expected near '='
Report Abuse
Biostream is not online. Biostream
Joined: 28 Mar 2011
Total Posts: 913
06 Jul 2012 04:16 PM
elseif (condition) then.

The error says it all my friend. You forgot a then
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Jul 2012 04:17 PM
Also,

elseif script.Parent.Parent.InUse == false then

Two equal signs for if statements, or better yet:

    elseif not script.Parent.Parent.InUse then

> † KMXD †
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
06 Jul 2012 04:18 PM
Replace "elseif" with "else"
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
06 Jul 2012 04:19 PM
Conditional statements need either a == or ~=
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Jul 2012 04:19 PM
Ah, now that I see what you're trying to do, use cheat's suggestion.

> † KMXD †
Report Abuse
LAAAGH is not online. LAAAGH
Joined: 24 Feb 2012
Total Posts: 3
06 Jul 2012 04:19 PM
if script.Parent.Throttle ~= 0 then
script.Parent.Parent.InUse = true
elseif script.Parent.Parent.InUse == false
end

-- LAAAGH
Report Abuse
plesantly8 is not online. plesantly8
Joined: 24 Feb 2010
Total Posts: 136
06 Jul 2012 04:21 PM
Thank you cheat. Your my hero for the next 4 and half seconds.
Report Abuse
plesantly8 is not online. plesantly8
Joined: 24 Feb 2010
Total Posts: 136
06 Jul 2012 04:22 PM
No I didn't put two equal signs at the one on the end because I am going to change it to false.
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