Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change a brickcolor to another bricks color?

Asked by 9 years ago

I'm trying to make a new head for something, just I can't change it to the players head color

head2.BrickColor = BrickColor.new(character.Head.BrickColor)
0
is there any output? NinjoOnline 1146 — 9y
0
07:29:30.007 - Players.Player.PlayerGui.GUI.Scripts.Gunscript:56: bad argument #1 to 'new' (Color3 expected, got userdata) 07:29:30.008 - Script 'Players.Player.PlayerGui.GUI.Scripts.Gunscript', Line 56 07:29:30.008 - Stack End ScriptingCon 52 — 9y

2 answers

Log in to vote
2
Answered by
woodengop 1134 Moderation Voter
9 years ago

Don't use the BrickColor.new in cases like this, remove it and add this:

character.head2.BrickColor

Now lets add it to your script:

head2.BrickColor=character.head2.BrickColor

Hope this Helped!

0
Works thanks ScriptingCon 52 — 9y
0
character.Head.BrickColor*(; Goulstem 8144 — 9y
0
Oh thx sorry. woodengop 1134 — 9y
Ad
Log in to vote
3
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

You're trying to make a BrickColor datatype out of a BrickColor datatype.. the BrickColor.new function takes a string, or number as an argument. You're giving it another BrickColor datatype.


What you're doing: BrickColor = BrickColor.new(BrickColor.new())

What you need to do: BrickColor = BrickColor.new()


So to fix? Just remove the BrickColor.new() and have soley character.Head.BrickColor since that returns a BrickColor.


head2.BrickColor = character.Head.BrickColor

Answer this question