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: BrickColor

Previous Thread :: Next Thread 
austin10111213 is not online. austin10111213
Joined: 27 Nov 2008
Total Posts: 363
28 Feb 2015 03:32 PM
Im trying to make a brick that when a player touches it, it turns the color of that players team. Below is what I have but the part just turns black.

script.Parent.Touched:connect(function(hit)

if hit.Parent.Humanoid ~= nil then
Player = game.Players:GetPlayerFromCharacter(hit.Parent)
script.Parent.BrickColor = BrickColor.new(Color3.new(Player.TeamColor))
end
end)
Report Abuse
Razurix is not online. Razurix
Joined: 30 Sep 2011
Total Posts: 5376
28 Feb 2015 03:34 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent.Humanoid ~= nil then
plr = game.Players:GetPlayerFromCharacter(hit.Parent)
script.Parent.BrickColor = plr.TeamColor
end
end)

Make sure this script is inside the brick.

Shut your pie hole
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
28 Feb 2015 03:34 PM
1. Color3's are not brickcolors

2. TeamColor is a brickcolor

3. "Color3.new(Player.TeamColor)" is not the correct format


script.Parent.BrickColor = Player.TeamColor

Report Abuse
austin10111213 is not online. austin10111213
Joined: 27 Nov 2008
Total Posts: 363
28 Feb 2015 03:35 PM
Thanks for the help!
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