Yielding in ContextActionService function causes client crash

When you run this code in online mode, it causes a client crash, without any meaningful output to the client to be able to debug the problem. It only gives a proper error in Studio.

Repro in LocalScript:

[code]
local function attack()
print(“Attacking”)
wait(3)
print(“Done attacking”)
end

game:GetService(“ContextActionService”):BindAction(“Attack”, attack, true, “f”)[/code]

Did some testing and reported this a while ago, though it seems nothing has been done about it.

other things:
[ul]
[li]It doesn’t crash on Mac[/li]
[li]It happens with any error, not just yielding (iirc)[/li]
[/ul]

I reported this directly to staff members with a demo place months ago.
And yes, any error will crash the client instead of just disconnecting.

Thought I fixed this… looking into it now. Thanks for the report everybody!

This is now fixed, look for the fix on production a week from Thursday.