While attempting to constrain a part to a players hand via an AnimationConstraint I ran into inconsistent crashes on attaching/deattaching said part. I am trying to use this system to pick up a tool and then be able to throw it. My process is as follows:
(on grab)
set AnimationConstraint Attachment0 to Part player is grabbing
Set Part to massless
Set Part to cancollide false
(on throw)
set AnimationConstraint Attachment0 to nil
Set Part to not massless
Set Part to cancollide true
Set Part AssemblyLinearVelocity to simulate throw
All of these steps are handled in BindToSimulation and the game still crashes on what seems to be setting Attachment0. It seems a bit arbitrary wether the crash occurs, sometimes on first grab it happens while other times I can pick up and throw it 4-5 times before it crashes.
I have experienced this bug in both studio and live servers. I have been able to repro it on both a windows 11 PC with an Intel Core Ultra 9 275HX @ 2.7 GHz, 64 GB, NVIDIA GeForce RTX 5060 and an iphone 13.
Here is a repro file and steps:
CrashRepro.rbxl (61.5 KB)
play uploaded file and hit E repeatedly within 15 studs of red part. the faster you hit it the more consistently the crash seems to happen.
A private message is associated with this bug report