Car Colour paint system won't change the colour to what I select

Hi, I keep having an issue with my car painting system, My car paint system works kinda. When a player paints their car with any option colours it keeps doing the same colour (institutional white) This includes the paint and the rims. I did find the root cause; is that colorvalue isn’t changing the colorvalue. Making the default colour not changing which paints the car that colour.

Color Main local script:

for i,v in pairs(script.Parent.Frame:GetChildren()) do

	v.MouseButton1Down:Connect(function()

		print(v.Name.." is down")

		local Color = BrickColor.new(v.BackgroundColor3)

		script.Parent.ColorValue.Value = Color

	end)

end

Hopefully you guys can help!!

It’s hard to read your script because everything is spaced out, there’s also no comments. So because you know more about this script than me, use print or breakpoints to determine what points your script gets to. Try to answer all these questions:

Is FireServer being called?
What is the server recieving from the remote?
Are mouse button events being reached and fired?
Are there any errors or warnings?

1 Like

for me it appears that you’re trying to change your color value in a localscript

this change won’t replicate to the server, instead send your color value with the pay remote. also don’t send the cost of what you want to buy in a remote, instead send what you want to buy then have a modulescript with all the costs on the server (so it can reference and get the actual value)

2 Likes

Hu I don’t really know how to do that. Also what is a pay remote? Do you mean Remote event?

PaintEvent and RimEvent both pass in PaintCost and RimCost, which your server just yoinks straight out, hackers can fire the remote and pass in 0 for either one of those to get the paint colors for free.

pass in the color name you want to paint your car instead of paintcost and then use a dictionary like

local PaintColorModulescript = {}

PaintColorModulescript["Deep red"] = {
  color = Color3.fromRGB(150, 0, 0);
  cost = 500;
}

return PaintColorModulescript
1 Like

It may have to do with the fact that you may be configuring the color wrongly using colorvalues. I’ve dealt with this problem before. Color3Values store data as RGB from 0 to 255. Color.new() creates a color value that takes in values from 0 to 1. If you try to set the color of an object to the value of a Color3Value, you may end up having it all black or white.

1 Like

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