This script is for painting cars! It paints the car just fine but when its in a regen button... say I have two people in game... i just painted my car Really Red. He pulls up to get his car painted.. and he clicks a different color... It just changed the color of my car to his color and his car didn't change at all... How do I get it to paint his car the color he wants... and the color of my car stays? And everyone can get their car painted!
script.Parent.MouseButton1Click:connect(function()
wait(2)
script.Parent.Parent.Visible = false
for i,v in pairs(workspace.dregen.Sedan.carbody:GetChildren()) do
if v.Name == "color" then
v.BrickColor = BrickColor.new("Really red")
end
end
end)

4 comments
BTW this script is inside the gui that has all the colors... and you select the color that you want!
You would need something to represent who the owner of the car is. I'm assuming that there are 2 Sedans in the game and your script finds the first Sedan in the Workspace Hierachy to paint.
How do I do that? I thought that's what i needed to do... but i don't know how :/
We need more information. For instance, is this a SurfaceGUI, is the script a local script, etc?