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 » Scripters
Home Search
 

Re: return brickcolor name

Previous Thread :: Next Thread 
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 05:46 PM
I'm trying to figure out how to do this thing where on my Color Changer when I click a different color on the model the Surface Gui Text on the thing to change to the color's name.
Example:
I clicked neon green and the surface gui text displays "Neon Green"

Anyone know how to do this?

script:

wait(1)
for i,v in pairs(script.Parent.Buttons:GetChildren()) do
if v:FindFirstChild("ClickDetector") then
v.ClickDetector.MouseClick:connect(function()
script.Parent.Color.BrickColor = v.BrickColor
script.Parent.Parent.Parent.DropColor.Value = v.BrickColor
end)
end
end

I tried doing adding this but didn't seem to work:

script.Parent.Color.BrickColor = script.Parent.Sign.SurfaceGui.TextLabel.Text

- RBXDev Manager and Game Developer.
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
02 Aug 2015 05:47 PM
brick = game.Workspace.Part.BrickColor

print(brick)
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 05:48 PM
I don't need it printing the color of the brick to the console.
I'm talking about where it prints to the Surface Gui like...
I clicked neon green and the surface gui text displays "Neon Green"
Report Abuse
igunaa is not online. igunaa
Joined: 15 Sep 2010
Total Posts: 2588
02 Aug 2015 05:49 PM

SurfaceGui.Text = game.Workspace.Part.BrickColor

Said the wise.
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
02 Aug 2015 05:49 PM
just make a Textlabel in the script(create one in the script) and have the text be = BrickColor
using the defining method I showed you
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 05:52 PM
I changed it to this now I'm getting an error.

wait(1)
for i,v in pairs(script.Parent.Buttons:GetChildren()) do
if v:FindFirstChild("ClickDetector") then
v.ClickDetector.MouseClick:connect(function()
script.Parent.Color.BrickColor = v.BrickColor
script.Parent.Sign.SurfaceGui.TextLabel.Text = script.Parent.Color.BrickColor
end)
end
end

Error:
Workspace.Colorize.ColorizerScript:6: bad argument #3 to 'Text' (string expected, got BrickColor)
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:01 PM
bump
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
02 Aug 2015 06:02 PM
tostring(thecolor)
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:04 PM
It doesn't have a certain color. It's a color changer where you click diffrent colors and the brick's color changes to the color you clicked.

I just want it to display the colors name they clicked on a surface gui.


- RBXDev Manager and Game Developer.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Aug 2015 06:05 PM
BrickColor.Name
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:08 PM
^ it prints an error saying "Name cannot be assigned to"

my line of code:
script.Parent.Color.BrickColor.Name = script.Parent.Sign.SurfaceGui.TextLabel.Text
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:12 PM
oh come on why cant anyone help me
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Aug 2015 06:16 PM
**facepalm**

You know the basics of scripting right?


script.Parent.Sign.SurfaceGui.TextLabel.Text = script.Parent.Color.BrickColor.Name
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:18 PM
Yes im pretty good at it but THANK YOU SO MUCH I OWE U LIFE
JK BUT IM SERIOUS THANK YOU SO MUCH IT TOOK OVER 10 POSTS FOR SOMEONE TO FINALLY HELP ME AND CORRECT THIS I THANK YOU
oper.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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