#automatic door open and closing
16 messages · Page 1 of 1 (latest)
Maybe put debounce=true outside if “if not hit then”
Because if hit==true then debounce never is set back to true
I’m a but confused by your code because hit is a parameter for that function and it will ALWAYS exist
Because if something touched it to fire the function then hit (what touched it) will be there
This is true
So by putting the true in the nested if statement that is pretty much impossible, you create like a small soft lock
So the fix is to either add hit == ( something it shouldn't touch ) or to not use the hit parameter for your nested if statement
Since hit always exists in a touched event
thx I'm trying to fix it
** You are now Level 6! **
Tell us how it goes