Block Color Change

Hello I want to make a Color Picker GUI that changes the color of a part inside the workspace
Here is the script, but it doesn’t change the color of the part

I also tried to change "color " in color3 but it gave to me this error: "Color3 is not a valid member of MeshPart “Workspace.PlayersFolder.Ironboy1965.Car5.Body.Body”

I couldn’t understand why you turn the color value to string here, could you explain that?

Cause I’m a new Developer and there are functions that I don’t really know very well so I saw that tostring function converts the string in number , and I thought I had to use it

No,
tonumber converts the string into a number[ only if possible] - for e.g: tonumber("watermelon") would not work.

tostring converts the number into a string - for e.g: tostring(player.UserId), the id here now would be represented as a string.

You dont need to convert the BackgroundColor3 into a string.

1 Like

oh ok, well I changed the script and now the color of the part changes, but it doesn’t change anymore, so if the start color is White, when I change it doesn’t change the color of the part

Do you mind posting the script here?

Please format it like this :

print("test")

well the script actually works using a Remote Event so:
Script:

local RedEvent = script.Parent.ColorEvent
local Palette = script.Parent.ColorValue
local ColorDisplay = script.Parent.ColourDisplay

local function Color(player)
	local Car1 = workspace.PlayersFolder:FindFirstChild(player.Name):WaitForChild("Car5", 1)
	local Body = Car1.Body.Body
	local Body2 = Car1.Body.Body2
	
	Body.Color = ColorDisplay.BackgroundColor3
	Body2.Color = ColorDisplay.BackgroundColor3
		
end

RedEvent.OnServerEvent:Connect(Color)

Local Script

local ColorEvent = script.Parent.ColorEvent

local ColorDisplay = script.Parent.ColourDisplay

ColorDisplay:GetPropertyChangedSignal("BackgroundColor3"):Connect(function()

ColorEvent:FireServer()

end)
1 Like

Hi @Ironboy1965 Can you try using

https://developer.roblox.com/en-us/api-reference/datatype/BrickColor

Since What you are editing is a part.