Script color help

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

  2. What is the issue? Include screenshots / videos if possible!

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

local DropperPartsFolder = script.Parent.Parent.Parent.DropperParts

while wait(2) do
local NewPart = Instance.new(“Part”, DropperPartsFolder)
NewPart.Position = script.Parent.SpawnPart.Position
NewPart.Size = Vector3.new(1,1,1)
NewPart.Color = “Dusty Rose”

local CashValue = Instance.new("NumberValue", NewPart)
CashValue.Value = 1
CashValue.Name = "CashValue"

end

Why doesn’t the color change?

Because you need a Color3 or BrickColor to Apply the Colors, like so:

NewPart.BrickColor = BrickColor.new("Dusty Rose")
1 Like

This particular piece of code is incorrect.

If you want to set a BrickColor color value, you must use the BrickColor property.
NewPart.BrickColor = BrickColor.new(“Dusty Rose”)

2 Likes

You forgot the .new method after BrickColor.

1 Like

Oh, okay thank you. This is a great explanation. I asked Roblox ai to do this and it wasn’t capable of doing it, in the video we saw it make a whole car lol. This is simple stuff.

1 Like

Thank you bro. This is a very good explnation. I asked Roblox ai to do this and it wasn’t capable of doing it, in the video we saw it make a whole car lol. This is simple stuff.

1 Like

How would I add a affect on it? I can’t find that online. I know how to do it for a GUI only.

I gave the roblox AI my own try while developing a game project (which I still am), if you write a good comment and give it some background code, it will generate amazing responses. Although at the moment it’s in a terrible state and is often very slow, gives incorrect or outright weird responses, or doesn’t respond at all…

1 Like

Sorry, what do you mean by an affect? Do you mean effects?

1 Like

Like the ParticleEmitter having a red color affect.

Bro, the CashValue works in this script. In this script it shows
an error: local CashValue = script.Parent.Parent.Parent.Parent.Values.CashValue

script.Parent.Touched:Connect(function(Hit)
if Hit.Name == “Part” and Hit:FindFirstChild(“CashValue”) then
CashValue.Value += Hit:FindFirstChild(“CashValue”).Value
Hit:Destroy()
end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.