task.defer stops executing the passed function after some amount of time in live servers.
This issue has affected Pilfering Pirates. In this game there is a lot of destruction and I use task.defer to destroy any basepart joints that need to be destroyed at once. At some point the servers will just stop destroying joints.
The first report I received of this issue was Nov 14, 2024 | 2:06 AM (GMT)
Getting this issue too, running anything in a task.defer(function() just simply does not run. For me this happens in both live servers and studio sessions.
Edit: Trying to make a repro of this, not sure what causes this exactly because just running a simply script does work so a real head scratcher rn.
Edit #2:
I unfortunately can’t find a way to make a repro even though this happens immediately and consistently 100% of the time at this current experience.
I got a report on this at around November 14 7pm EST and after the report the game’s ragdoll is completely broken as the clean up runs in task.defer. What happens now is that things don’t respawn when they should.
I can’t make a repro because if I take this script alone in a different place it runs but it will not run in that studio and it won’t run in live servers, not sure what is going on.
If you’re still having this issue just copy and paste your game into a new studio and it’ll fix the problem. Even after setting all of the property settings in workspace, lighting, material, textchatservice, etc to the same configurations you have in the game it won’t cause that issue to happen again. Gonna edit this post with a bug repro on late saturday or sunday.
I made a reproduction that reproduces this task.defer bug consistently. Just reset your character and look at the short HandleRagdoll script and you’ll notice that “THIS WILL NOT PRINT” won’t print. This will happen both ingame and studio, this bug doesn’t happen in all games and presumably (?) only happens in older experiences/studios that uses task.defer.
Like I noted earlier this started happening at around November 14 7pm EST. Hope this helps.
elseif child:IsA("BaseScript") or child:IsA("Script") or child:IsA("LocalScript") then
if not ScriptsToAvoid[child.Name] then
child:Destroy()
end
You’re destroying the "Ragdoll" script under the character that requires your module, causing the thread to terminate after it yields. That’s why everything runs expect the task.defer.
Please double-check that your repros aren’t flawed before posting.