Delay something in void Update

Hello dear Unity commUnity. Never realised that pun until now. In the void update function im trying to delay the x++ from happening to fast. Most of what I came up with wanted me to use “Yield WaitForSeconds” but it seems like it is not working in the new version, and I don’t know what to do. Help?

In void update:

if (Input.GetMouseButton(0))
{

		x++;
		yield WaitForSeconds (0.25);
		
	}

I in the end used Invokerepeat.

(in void update)

InvokeRepeating(“timer”, 1.0f, 1.0f);

calling timer:

void timer()
{
x++;
CancelInvoke(“timer”);
}

Big thanks to the Facebook "Indie game developers page, they really helped me out.