25.10.2022, 12:43
event.getvalue() returns Boolean for 1 bit object, not a number. So your comparison does not work and message is empty (nil). Use this instead:
Code:
value = event.getvalue()
if value then
message = 'something is on'
else
message = 'something is off'
end