So I was following a brackeys tutorial, as your should, and I am getting pissed off about why this piece of code isn’t working (The cooldown part)
void Update()
{
if (Time.time >=nextAttackTime)
{
if (Input.GetMouseButtonDown(0))
{
nextAttackTime = Time.time + 10;
Attacking();
}
}
}