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: Why is this not working?

Previous Thread :: Next Thread 
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 05:43 PM
Some lines of code take up two lines, sorreh. :P
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 05:48 PM
BUMP
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 05:49 PM
I'll shorten it to make it readable. :P
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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 is online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
07 Aug 2011 05:51 PM
For one you mispelled Cheeseburger...
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 05:52 PM
Omg fail.
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 06:03 PM
Is anyone going to help!?!

BUMP BUMP BUMP!
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 06:06 PM
ANYONE!?!?! RAIIIIIIGGGG!!!!
Report Abuse
MyHandIsADolphin is not online. MyHandIsADolphin
Joined: 09 Apr 2011
Total Posts: 789
07 Aug 2011 06:18 PM
output plox
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 06:31 PM
Output doesn't help. :P
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 08:59 PM
Come on people!!! Its a small script thats less than 20 lines of code!!! D:
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 09:11 PM
Still not working.
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
stephendsdude is not online. stephendsdude
Joined: 19 Apr 2008
Total Posts: 1691
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
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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 is not online. Roundel
Joined: 20 Mar 2010
Total Posts: 469
07 Aug 2011 09:26 PM
You can refer to Enums by strings.
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
07 Aug 2011 09:35 PM
See!?!?!
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
07 Aug 2011 09:37 PM
Tux. Have you even tested mine?
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
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
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