|
| 07 Aug 2011 05:42 PM |
Cheesebruger = false while not Cheeseburger do wait(1) if game.Workspace.Part.Material == "Slate" and game.Workspace.Part.TopSurface == "Studs" then wait(1) game.Workspace.Part.Material = "Plastic" and game.Workspace.Part.TopSurface = "Inlet" wait(1) if game.Workspace.Part.Material == "Plastic" and game.Workspace.Part.TopSurface == "Inlet" then wait(1) game.Workspace.Part.Material = "Slate" and game.Workspace.Part.TopSurface = "Studs" end end end |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 05:43 PM |
| Some lines of code take up two lines, sorreh. :P |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2011 05:49 PM |
| I'll shorten it to make it readable. :P |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 05:51 PM |
Ok it should be readable now.
Cheesebruger = false while not Cheeseburger do wait(1) x = game.Workspace.Part if x.Material == "Slate" and x.TopSurface == "Studs" then wait(1) x.Material = "Plastic" and x.TopSurface = "Inlet" wait(1) if x.Material == "Plastic" and x.TopSurface == "Inlet" then wait(1) x.Material = "Slate" and x.TopSurface = "Studs" end end end |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 07 Aug 2011 05:51 PM |
| For one you mispelled Cheeseburger... |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2011 05:55 PM |
Output:
Workspace.Script:7: unexpected symbol near '='
How do I fix that? I'm setting a new property so don't I keep the '='? D: |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 06:03 PM |
Is anyone going to help!?!
BUMP BUMP BUMP! |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 06:06 PM |
| ANYONE!?!?! RAIIIIIIGGGG!!!! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 07 Aug 2011 08:59 PM |
| Come on people!!! Its a small script thats less than 20 lines of code!!! D: |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:04 PM |
Cheeseburger == false while not Cheeseburger do wait(1) x = game.Workspace.Part if x.Material == "Slate" and x.TopSurface == "Studs" then wait(1) x.Material = "Plastic" x.TopSurface = "Inlet" wait(1) elseif x.Material == "Plastic" and x.TopSurface == "Inlet" then wait(1) x.Material = "Slate" x.TopSurface = "Studs" end end
Guys, c'mon. >.> Easy peice of broken code. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:09 PM |
Dark:
Cheeseburger = false while not Cheeseburger do wait(1) x = game.Workspace.Base if x.Material == "Slate" and x.TopSurface == "Studs" then wait(1) x.Material = "Plastic" x.TopSurface = "Inlet" wait(1) elseif x.Material == "Plastic" and x.TopSurface == "Inlet" then wait(1) x.Material = "Slate" x.TopSurface = "Studs" end end
It's '=' not '==' on line one. :P |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:10 PM |
Tux,you're comparing a object in line 2.
while not Cheeseburger = false do <--Error while not Cheeseburger == false do <--Correct |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2011 09:14 PM |
Dark:
I'm assigning 'Cheeseburger' a value. I think 'if' statements are an example of when '==' is needed. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:16 PM |
Material values aren't saved as strings. They are referred as:
Enum.Material.[material here]
Like: Enum.Material.Slate
and so on. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:19 PM |
Omg stephen! Then why did this script I made work in Script Builder!?!
game.Workspace.Base.Material = "Slate" |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
|
| 07 Aug 2011 09:26 PM |
| You can refer to Enums by strings. |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Aug 2011 09:36 PM |
But that still doesn't answer my script problem. :/
F L O O D C H E C K |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:37 PM |
| Tux. Have you even tested mine? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:37 PM |
Cheeseburger = false while not Cheeseburger do wait(1) x = game.Workspace.Part if x.Material == ("Slate") and x.TopSurface == ("Studs") then wait(1) x.Material = ("Plastic") and x.TopSurface = ("Inlet") wait(1) if x.Material == ("Plastic") and x.TopSurface == ("Inlet") then wait(1) x.Material = ("Slate") and x.TopSurface = ("Studs") end end end
Simple. |
|
|
| Report Abuse |
|
|