Hello I am trying to teach myself C# and in a part of my code I am trying to determine how long a key has been held so I can play a different animation, so for example, you have been walking for four seconds so now you’re are sprinting.
Here is my code for this part,
{if(Input.GetKeyDown(“w”) >=4)
{print(“Run”);}}
I am getting this error “Operator >=' cannot be applied to operands of type bool’ and `int’” and I’m not sure what to do, help please? ![]()
I am just using print now to show that part is working, I’ll add the animation later.