Click Function Change Color

I made that script, if I click the part it’ll turn red, but I don’t know how to add the TurnYellow function. So if I click again it changes to TurnYellow, and if I decide to click again turns TurnRed function and again and again.

Sorry for my English, I hope you understood.

You can just add a boolean to it and check that to see the color.

local red = false

function mouseclick()
  if red then
    red = false
    TurnYellow()
  else
    red = true
    TurnRed()
  end
end