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: Help with this one line of code.

Previous Thread :: Next Thread 
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:16 AM
repeat wait() until killstreak.Value / 5 = 1 or killstreak.Value / 5 = 2 or killstreak.Value / 5 = 3 or killstreak.Value / 5 = 4 or killstreak.Value / 5 = 5

"unexpected symbol near '='"

I think this error may be referring to the 'or', and if so, how would I get around this?
Report Abuse
Bowbro is not online. Bowbro
Joined: 25 Aug 2012
Total Posts: 9
26 Aug 2012 07:17 AM
I'm probably completely wrong, but if it's a script, shouldn't it have to go inside the workplace? Or at least have some sort of main point?
I'm a noob at scripting, so if this makes no sense, just ignore it.
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:18 AM
This is in a LocalScript.
Report Abuse
Bowbro is not online. Bowbro
Joined: 25 Aug 2012
Total Posts: 9
26 Aug 2012 07:19 AM
So, a local script is something that already is in something? o:
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:20 AM
Sort of. LocalScripts are usually put inside of Player's BackPacks or PlayerGuis via StarterPack/StarterGui.
Report Abuse
Bowbro is not online. Bowbro
Joined: 25 Aug 2012
Total Posts: 9
26 Aug 2012 07:21 AM
So, the script here would be if they get a kill streak with something they're holding right? (Well inside the backpack)
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:23 AM
Mhm. I use this line to detect if someone achieves a certain amount of kills (I'd rather not explain everything.)

But I still don't know why 'or' would cause the script to malfunction, or whatever is causing it to do so, because I don't see why Lua wouldn't be able to comprehend this. I may be using the "until" statement wrong.
Report Abuse
Bowbro is not online. Bowbro
Joined: 25 Aug 2012
Total Posts: 9
26 Aug 2012 07:25 AM
Have you tried at looking at scripts which also involve kill streaks? That's what I would do... lol
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:30 AM
I tend to not try to refer to free models, and in my case it stil probably wouldn't help. This is more of a syntax error.
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
26 Aug 2012 07:32 AM
You put '=' and not '=='. I tink i found ur problem
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
26 Aug 2012 07:34 AM
repeat wait() until killstreak.Value / 5 == 1 or killstreak.Value / 5 == 2 or killstreak.Value / 5 == 3 or killstreak.Value / 5 == 4 or killstreak.Value / 5 == 5
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
26 Aug 2012 07:35 AM
Hey that actually worked... I thought a previous error made that invalid, but thanks.
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