So here is my script.
And when I touch it I get more cash.
so the grey dark one is just my part to know what is the number for a specific color
But when I step on it, it turns to white
Tho I don’t get it because when I use other colors like red it works
2 Likes
Valkyrop
(JustAGuy)
March 18, 2022, 1:36am
#2
If I understood you right, the problem is with different colorized bricks other than white?
1 Like
Yes, but when I want the part to turn to “Dark stone grey” it just changes to white
Valkyrop
(JustAGuy)
March 18, 2022, 1:39am
#4
You can make it so whenever the brick is touched by a player, it’d change its color to that color, it should work fine
Valkyrop
(JustAGuy)
March 18, 2022, 1:40am
#5
Another tip:
Instead of : PLAYER.leaderstats.money.Value = …
You could do :
PLAYER.leaderstats.Money.Value += YOUR_AMOUNT
That’s not the problem…The problem is when I want to change the color of a part if won’t work and will just turn to white
Valkyrop
(JustAGuy)
March 18, 2022, 1:43am
#7
Oh! I now see that!
You are using BrickColor.
You need to use the color Name for that.
Valkyrop
(JustAGuy)
March 18, 2022, 1:43am
#8
YOUR_BRICK.BrickColor = BrickColor.new(“ColorName”)
1 Like
I don’t quite get that (can you please give an example?)
Valkyrop
(JustAGuy)
March 18, 2022, 1:44am
#10
You could convert these 2 if you wanted
IT WORKS!! Thank you so much
1 Like
Valkyrop
(JustAGuy)
March 18, 2022, 1:45am
#12
Replace the line in that code where u change the color,with this :
YOUR_BRICK.BrickColor = BrickColor.new("“ColoeName”)
It’d automatically open u a list of colors inside of these ()
Valkyrop
(JustAGuy)
March 18, 2022, 1:45am
#13
No problem! Make sure to mark it as a solution:)
In case you wanted to go the RGB route as well instead of actually picking one (which I don’t see why you would, but just for future knowledge) you could do something like the following as well:
p.BrickColor = BrickColor.new(0.7, 0.7, 0.7)
The issue here was because BrickColor.new when working with numbers rather than color only accepts values which are decimals between 0 - 1
2 Likes
Thank you! I will surely keep this in mind :))
1 Like
Valkyrop
(JustAGuy)
March 18, 2022, 1:53am
#16
You could get the color3 of a BrickColor by doing something like this:
Part.Color =BrickColor.New(“Bright red”).Color
1 Like