I would like to change the color from one part to another color and then go back to the color that was before, but without simply writing the color that was before, understand?
Yeah just save the previous color in a variable
local colorpart = workspace.part -- your part here
local oldcolor = colorpart.BrickColor
colorpart.BrickColor = BrickColor.new(1,0,0) --should be red
wait(3)
colorpart.BrickColor = oldcolor