Script folders on dead npcs will detach from the npc

Describe the bug:
World widgets on script folders that are attached to dead npcs will remain, even after using npc:Destroy().

Scripts that are attached to script folders will also detach from the entity.

How do you cause this bug?

  • List the steps
    Download the overhead package and attach the overhead script folder to an npc.
    Kill that npc with:
function ScriptName:Init()
    self:Schedule(function()
        Wait(3)
        self:GetEntity():SetAlive(false)
        Wait(1)
        self:GetEntity():Destroy()
    end)
end

Even after the npc is destroyed, the overhead widget will remain in the game on position (0,0,0).

Screenshots / video of bug:
The first video might be more understandable. It shows how i add a widget to a script folder, which then remains after i kill and destroy the npc. Then i do the same but instead attach the widget to the entity itself - which is the right behaviour.

This one also shows it for scripts attached to the npc or to the script folders (a bit harder to visualize, so the upper video is better).

Which platform: PC

Which input: keyboard + mouse

Your Crayta username: Daigoro

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible):
100%

Version number (found in Help tab in Settings): 0.f3.28.120518

Hey @Ya_shi_shi !

This one as well has a ticket entered into our system! :slight_smile: Keep those issues coming!
Thanks again for finding all these issues.

Hope to see more entered today :sun_with_face:

Seems like it doesn’t affect only the script folders, but all children. So entities attached to npcs will also not get destroyed, when the npcs is killed and then destroyed.

I updated the ticket with this information! :slight_smile:

1 Like

This bug was mentioned as solved in the recent patch notes, but it doesn’t seem like it would be fixed.
If i try to reference scripts on dead npcs i still get an error if these are attached to script folders on the npc.