Crazace
|
  |
| Joined: 06 Dec 2010 |
| Total Posts: 3414 |
|
|
| 14 Aug 2012 09:06 AM |
x = game.Workspace while true do --random names FTW x.cool.Position = Vector3.new(-48, 11, 43) x.max.Position = Vector3.new(-45, 11.4, 40) x.for.Position = Vector3.new(-48, 14.8, 40) x.me.Position = Vector3.new(-48, 11.2, 40) x.low.Position = Vector3.new(-48, 11, 37) x.chow.Position = Vector3.new(-51, 11.2, 40) x.mom.Position = Vector3.new(-48, 7.6, 40) wait(2) x.cool.Position = Vector3.new(-48, 4.6, 43) x.max.Position = Vector3.new(-45, 5, 40) x.for.Position = Vector3.new(-48, 8.4, 40) x.me.Position = Vector3.new(-48, 4.8, 40) x.low.Position = Vector3.new(-48, 4.6, 37) x.chow.Position = Vector3.new(-51, 4.8, 40) x.mom.Position = Vector3.new(-48, 1.2, 40)
There's my script. Now I know I have random names, and I need an end, but my script isn't over (I'm still writing it), but I keep getting an error; every time I disable and enable it, it says "Workspace.Script2:7: '<name>' expected near 'for'". I know I probably messed up on the position stuff, I'm out of practice. But I don't get what it's asking me to do...help?
|
|
|
| Report Abuse |
|
|
Crazace
|
  |
| Joined: 06 Dec 2010 |
| Total Posts: 3414 |
|
|
| 14 Aug 2012 09:08 AM |
| Sorry, it says "Workspace.Script2:7 <name> expected near 'for'" |
|
|
| Report Abuse |
|
|
Crazace
|
  |
| Joined: 06 Dec 2010 |
| Total Posts: 3414 |
|
|
| 14 Aug 2012 09:09 AM |
It has these "<>" and "name" in between them. It doesn't show up in my post DX |
|
|
| Report Abuse |
|
|
FireTG
|
  |
| Joined: 28 Oct 2010 |
| Total Posts: 291 |
|
|
| 14 Aug 2012 09:10 AM |
The position stuff looks fine. ALWAYS put "end"s first. Or get a syntax highlighting text editor that does it for you (Sublime Text 2 is my favourite, also stravant made RBX.Lua syntax highlighting for it!). "for" is a Lua keyword, maybe that is the problem. Try this: x = game.Workspace while true do --random names FTW x.cool.Position = Vector3.new(-48, 11, 43) x.max.Position = Vector3.new(-45, 11.4, 40) x:findFirstChild("for").Position = Vector3.new(-48, 14.8, 40) x.me.Position = Vector3.new(-48, 11.2, 40) x.low.Position = Vector3.new(-48, 11, 37) x.chow.Position = Vector3.new(-51, 11.2, 40) x.mom.Position = Vector3.new(-48, 7.6, 40) wait(2) x.cool.Position = Vector3.new(-48, 4.6, 43) x.max.Position = Vector3.new(-45, 5, 40) x:findFirstChild("for").Position = Vector3.new(-48, 8.4, 40) x.me.Position = Vector3.new(-48, 4.8, 40) x.low.Position = Vector3.new(-48, 4.6, 37) x.chow.Position = Vector3.new(-51, 4.8, 40) x.mom.Position = Vector3.new(-48, 1.2, 40) end
|
|
|
| Report Abuse |
|
|
Crazace
|
  |
| Joined: 06 Dec 2010 |
| Total Posts: 3414 |
|
|
| 14 Aug 2012 09:12 AM |
@Fire, "for" is my parts name (I came up with weird names), maybe since for is a keyword I have to change it?
I'm trying to make this thing go up and down over and over again. |
|
|
| Report Abuse |
|
|
YOSkater
|
  |
| Joined: 19 Mar 2011 |
| Total Posts: 13337 |
|
|
| 14 Aug 2012 09:32 AM |
I think this is what your looking for...
while true do brick = script.Parent brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z+1) wait(.1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z+1) wait(1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z+1) wait(.1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z+1) wait(1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z-1) wait(.1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z-1) wait(1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z-1) wait(.1) brick.Position = Vector3.new(brick.Position.x+0,brick.Position.y+0,brick.Position.z-1) wait(1) end
if notPM me or reply thats its not I'll try anoter one might not work BTW |
|
|
| Report Abuse |
|
|
FireTG
|
  |
| Joined: 28 Oct 2010 |
| Total Posts: 291 |
|
|
| 14 Aug 2012 09:35 AM |
Did you try the fixed script I gave you? Also, your script would not work properly because the parts would go back to their former position as soon as they moved. Add a wait(2) right before "end" to prevent that from happening. |
|
|
| Report Abuse |
|
|
Crazace
|
  |
| Joined: 06 Dec 2010 |
| Total Posts: 3414 |
|
|
| 14 Aug 2012 09:37 AM |
I fixed it. Thanks for the help! :D |
|
|
| Report Abuse |
|
|