AccessoryWeld and TouchInterest gets created twice when equipping or unequipping accessory

Reproduction Steps
I’m trying to access the AccessoryWeld in my code when an Accessory gets equipped, but I cannot do so because I’m getting a reference to a weld which was created and destroyed before the real weld is created. TouchInterest creation also has some problems.


Expected Behavior
When equipping:

  • Existing TouchInterest is removed once.
  • AccessoryWeld is created once.

When unequipping:

  • Existing AccessoryWeld is removed once.
  • TouchInterest is created once.

Actual Behavior
When equipping:

  1. New AccessoryWeld is created.
  2. Existing TouchInterest is removed.
  3. New TouchInterest is created.
  4. New TouchInterest is removed.
  5. New AccessoryWeld is removed.
  6. Real AccessoryWeld is created.

When unequipping:

  1. Existing AccessoryWeld is removed.
  2. New TouchInterest is created.
  3. New TouchInterest is removed.
  4. Real TouchInterest is created.

Workaround

local AccessoryWeld = Handle:WaitForChild("AccessoryWeld")
-- Bug workaround.
if AccessoryWeld.Parent == nil then
    AccessoryWeld = Handle:FindFirstChild("AccessoryWeld")
end

Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-12-05 00:12:00 (+01:00)

2 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

3 Likes