Before, when scripts needed to use a property, script, or function that wasn’t allowed in a simulation callback they used task.spawn() to break the simulation context and access the needed data, but after updating to version 739, this behaviour was changed, which not only broke many of our systems but also caused default Roblox scripts to error.
For example, this part of the default AvatarAbilitiesInterface script errors on an empty baseplate with SAuth turned on:
if FFlagUserPlayerScriptsPlayerControlState then
task.spawn(function()
self._characterAddedConnection = player.CharacterAdded:Connect(function(character)
self:_onCharacterAdded(character)
end)
end)
task.spawn was used to access player.CharacterAdded, which isn’t allowed inside simulation callbacks, but now it errors on player join.
Expected behavior
Using task.spawn() exits the simulation context and lets scripts access data that otherwise can’t be accessed inside simulation callbacks.