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
 

Need help to fix this script.

Previous Thread :: Next Thread 
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
15 Jul 2012 07:47 AM
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
Term = game.Workspace["TerminalMain"]
Term.BrickColor = "Bright green"
end

It's supposed to turn a brick in workspace named TerminalMain Bright green after Choice1 is selected.

Output says it's all good, but the brick has not changed it's color.
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
15 Jul 2012 07:49 AM
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
Term = game.Workspace["TerminalMain"]
Term.BrickColor = BrickColor.new(37) -- Might work
end
Report Abuse
aase69 is not online. aase69
Joined: 04 Apr 2008
Total Posts: 3794
15 Jul 2012 07:50 AM
You did 2 things wrong :)

1: BrickColor is not a string value. It's a BrickColor value.
2: You forgot an end

script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
Term = game.Workspace["TerminalMain"]
Term.BrickColor = BrickColor.new("Bright green")
end
end)
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
15 Jul 2012 07:51 AM
Dafuq, I forgot other end.
Report Abuse
LightedRoblox is not online. LightedRoblox
Joined: 16 Apr 2010
Total Posts: 6235
15 Jul 2012 07:52 AM
Either of our script will work.


script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
Term = game.Workspace["TerminalMain"]
Term.BrickColor = BrickColor.new(37)
end
end)


Fixed
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