I’ve encountered this quite a few times and while it’s not exactly a problem for game production, it is getting a bit confusing when debugging old scripts and trying to work away “warnings”;
It appears to only be used inside the function called when InputBegan is fired, so it does appear to be local.
The problem is you want to use it as a global variable which means you should really initialise it outside of that scope.
You can fix it by writing somewhere in the global scope: (before InputBegan connection)
sittingIdle = nil
Or
local sittingIdle
This is nice for yourself as well, then you know that there is a variable named “sittingIdle” which is set and used in the global scope. Good coding practice!