Something about the way lsl-luau handles state changes differs from Mono.
It appears like the state is changed immediately instead of after the whole event is handled.
Take this test script:
integer screwthisimout()
{
if (TRUE) state other;
return 13;
}
default
{
state_entry()
{
integer r = screwthisimout();
llOwnerSay("after state change, r=" + (string)r);
}
}
state other
{
state_entry()
{
llOwnerSay("entered state other");
}
}
In mono, you see both llOwnerSay printed, State_Entry fully finished, the output is:
after state change, r=0
entered state other
in lsl-luau, state_entry doesn't get to finish and only outputs:
entered state other
Tested on the latest 2026-07-24 luau channel