I'm trying to make a button change two images at once?

Let me just start by saying I am absolutely a noob to code~!
Okay, so I’m using this code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Facepicker : MonoBehaviour {

	public SpriteRenderer part;
	public Sprite[] options;
	public int index;

	void Update(){

		for (int i = 0; i < options.Length; i++) {

			if(i == index){
				part.sprite = options*;*
  •  	}*
  •  }*
  • }*

  • public void Swap(){*

  •  if (index < options.Length - 1){*
  •  	index++;*
  •  } else{*
  •  	index = 0;*
  •  }*
  • }*
    I tried duplicating it in the inspector and using the duplicate for the cat face icon to change when the body type does, but it just doesn’t change. :frowning:

Duplicating may not work.
If there are two same scripts on an object, when you click the button, it can only execute one of them.
You can put two Facepicker scripts into two different objects, even the Skogkat button, and Skogkatt.
Finally, you have to make sure the OnClick event has been set to both “Swap” function in the script at the button.
Any question can comment, good day.