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: "=" expected near "=="

Previous Thread :: Next Thread 
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
27 Jan 2013 02:32 PM
while true do
wait(1)
Parent.Part.BrickColor == BrickColor.math.random()
end


I made it, Brickcolor is supposed to change every second. Whats the problem?
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
27 Jan 2013 02:33 PM
Uh... Exactly what it says...

"==" should be just one "="
Report Abuse
GtaForever123 is not online. GtaForever123
Joined: 19 Dec 2012
Total Posts: 49
27 Jan 2013 02:33 PM
[ Content Deleted ]
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
27 Jan 2013 02:34 PM
Workspace.Baseplate.Script:3: '=' expected near '=='
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
27 Jan 2013 02:34 PM
while true do
wait(1)
Parent.Part.BrickColor = BrickColor.math.random()
end

The single equals is an assignment operator, whereas double equals is a comparative operator.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
27 Jan 2013 02:35 PM
Umg

while wait(1) do
Game.Workspace.Part.BrickColor = BrickColor.random()
end
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
27 Jan 2013 02:36 PM
Doesn't work.
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
27 Jan 2013 02:39 PM
Try this:

while wait(1) do
Part.Parent.BrickColor = BrickColor.new(math.random)
end

Otherwise, if it isn't Part.Parent....

while wait(1) do
Parent.Part.BrickColor = BrickColor.new(math.random)
end

I'm pretty sure it would be something like that, and I don't believe you need to put two = signs.
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
27 Jan 2013 02:40 PM
All these scripts don't work. What the heck!!??
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
27 Jan 2013 02:41 PM
while wait(1) do
script.Parent.BrickColor = BrickColor.new(math.random)
end
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
27 Jan 2013 02:42 PM
while wait(1) do
game.Workspace.BrickNameHere.BrickColor = BrickColor.random()
end

Or

while wait(1) do
script.Parent.BrickColor = BrickColor.random()
end

My bad, ignore my other post.
Report Abuse
Xzerizon is not online. Xzerizon
Joined: 16 Aug 2011
Total Posts: 2174
27 Jan 2013 02:51 PM
while wait(1) do
 script.Parent.Part.BrickColor = BrickColor.new(math.random(1, 64)
end

Tested, it works just fine.

Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
27 Jan 2013 03:02 PM
@xzer: That won't work, I doubt you tested it.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 03:04 PM
I didn't know you can do BrickColor.new(math.random(1,64))
Report Abuse
pieinyofaceha is not online. pieinyofaceha
Joined: 09 May 2012
Total Posts: 2367
27 Jan 2013 03:08 PM
... you said Parent.Part.Brickcolor ...

I know this is an extremely basic answer, but try Part.Parent.BrickColor in replacement.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
27 Jan 2013 03:15 PM
@Gerit: It picks a random index of the colours (64 in total), but he forgot a second parenthesis.
Report Abuse
Xzerizon is not online. Xzerizon
Joined: 16 Aug 2011
Total Posts: 2174
27 Jan 2013 08:14 PM
@TheMyrco

I did test it. However, error fixing is very autonomous to me, and so I forgot to correct the script. Sorry.

Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
27 Jan 2013 09:18 PM
Well..
while wait(1) do
game.Workspace.BrickNameHere.BrickColor = BrickColor.random()
end

That should work, I tested it as well..
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
27 Jan 2013 09:26 PM
Is not 'game' always lowercase?
Report Abuse
yomamadude6 is not online. yomamadude6
Joined: 21 Nov 2009
Total Posts: 2151
27 Jan 2013 09:27 PM
doesnt matter
Report Abuse
Peaceless is not online. Peaceless
Joined: 24 Dec 2012
Total Posts: 31
27 Jan 2013 09:30 PM
Umg, OP is stupid.

And no, game doesn't have to be lowercase.

game
Game
workspace
Workspace
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
27 Jan 2013 09:30 PM
@tux,

game
Game
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
27 Jan 2013 09:35 PM
BrickColor = BrickColor.new(math.randm(1,64))

Eww


BrickColor = BrickColor.random()
Report Abuse
Dodeka is not online. Dodeka
Joined: 17 Oct 2012
Total Posts: 1441
27 Jan 2013 10:05 PM
[ Content Deleted ]
Report Abuse
TechWorks is not online. TechWorks
Joined: 04 Jan 2013
Total Posts: 282
27 Jan 2013 10:08 PM
while true do
wait(1)
R1 = math.random(0,255)
R2 = math.random(0,255)
R3 = math.random(0,255)

Parent.Part.BrickColor = BrickColor.new(Color3.new(R1/255,R2/255,R3/255))
end
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