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: "If" condition problem

Previous Thread :: Next Thread 
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 05:33 PM
How would I write this when using the "if" condition. For example,

test1=game.Workspace.test.BodyPosition

if test1.maxForce==(0,0,0) then
blah blah blah


Output:

Workspace.Breaker2.Script:3: ')' expected near ','


Report Abuse
ryster252 is not online. ryster252
Joined: 09 Sep 2008
Total Posts: 499
19 Aug 2012 05:35 PM
NO! NOT AT ALL
Report Abuse
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 05:36 PM
Then how?
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
19 Aug 2012 05:40 PM
test1 = game.Workspace.test.BodyPosition

if test1.maxForce == Vector3.new(0,0,0) then
--blah blah blah
end
Report Abuse
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 05:42 PM
Alright thanks.
Report Abuse
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 05:48 PM
I just checked and it still doesn't seem to work.
Report Abuse
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 06:10 PM
Please help!
Report Abuse
IlIll is not online. IlIll
Joined: 28 Aug 2011
Total Posts: 896
19 Aug 2012 07:15 PM
...lol... if there's no output, it likely worked. replace the
--blah blah blah
with
print("blah blah blah")
if you want something to happen
Report Abuse
slatosscripts231 is not online. slatosscripts231
Joined: 17 Aug 2012
Total Posts: 39
19 Aug 2012 07:42 PM
"blah blah blah" was just a reference to what appears to be a boring patch of code. I didn't want to write it and you didn't want to read it.

So, can you please help me figure this out?
Report Abuse
Bergan is not online. Bergan
Joined: 23 Nov 2007
Total Posts: 4942
19 Aug 2012 07:48 PM
I see 2 possibilities.
1. A Vector3 is needed.
2. Only one = is needed.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Aug 2012 07:49 PM
> 2. Only one = is needed.

No...

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Aug 2012 07:52 PM
Mama's should work.

† KMXD †
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