Script that implemented this callback has been destroyed

this was an error a couple of years ago and its still not fixed and i can’t post in studio bugs so if anybody can post it i would appreciate it as this bug is so annoying.


data saves aswell

1 Like

Can you explain when this error is occurring? Is it really a error, or just audio pointing out that the Script that printed the original error is absent, so the source can’t be viewed?

it crashes my studio and idk why

When does this happen? Can we see a video?

Did you destroy the script that called BindToClose or are you using the DataStore2 module? If you have a DataStore2 related script that gets destroyed/is disabled, that could be the issue.

im not using bindtoclose im using game.Players.PlayerRemoving and im using datastore2 for my devilfruit value and no theyre not getting removed or anything

but i did notice that it only happens after i kill an npc

Wait you are using Player.Removing for Datastore2? That should never be allowed in Datastore2.

no im not im using game.Players.PlayerRemoving and im also using datastore2

If you’ve tried every fix possible and nothing is working, delete lines 621-631 in the DataStore2 ModuleScript. Note that if you shut down servers after removing that code, any progress made by players still in the server after they joined that server may not save. Only resort to this if you’ve tried everything and you haven’t found a solution.

I noticed that the error is coming from the NPC animation script. Check if there’s anything related to DataStore2/BindToClose in there.

there isn’t at all, but i might delete datastore2 as i can just use the normal value instead with game.Players.PlayerRemoving

are you using it in the datastore script?

no im not using it inside of it

Try temporarily removing your DataStore2 code and see if you continue to get the error after that.

i just did and it still crashes after i kill an npc

i think the problem is the sword script because it only happens if i kill them with the sword and it also makes them punch really fast for some reason

nvm it has something to do with my equip or something idk roblox is weird