Random Folders in Workspace Getting Deleted for no Reason (fixed)

I usually never use the DevForum but I develop for a game called “Untitled Ragdoll Game” and the game has been plagued with a major bug causing folders in Workspace to get deleted.

We’ve been trying since the game became active to try to find this bug but we don’t know how to replicate it or where it’s coming from, it occurs in public servers that have been up for a while. We’ve tried to CTRL+SHIFT+F and look through every :Destroy(), we’ve put checks on what we believed could cause this to make sure things not supposed to be deleted aren’t getting deleted. Noticably, there’s no errors in consoles in public servers plagued with this, meaning that this is intentionally being done somehow.

We don’t even know if this is an exploit, a glitch being abused by players, or if this is solely our code. We’re completely lost on this. I apologize if I make a mistake on categorizing because I have never ever written a Topic on DevForum up until now because this is ruining our game.

What I’m mainly looking for is how can I debug this? Possibly something that tracks every :Destroy()? I don’t know the possibility of that but I’m running out of options.

Game link, you could probably easily find a server messed up by this bug:

4 Likes

As you partially suggested, personally I would make a ChildRemoved function that checks workspace and start watch a server and its logs to see if the bug occurs. Along with some prints that would probably lead you to the cause of the bug or possibly exploit. Would likely be time consuming though.

1 Like

Time consuming is no understatement. I have put strict checks on everything that a player can interact with involving :Destroy()… Yet, this still happens

2 Likes

As a temporary solution, if it’s such a problem a server could just check to see if one of these folders had been deleted, and possibly restore a backup if so. It isn’t a real solution as much as a botch-fix, but if probable (depending on how your game is structured), it could be a temporary fix.

2 Likes

Very true.

Sounds very easy to implement if I see to it there’s no other way I’ve found

2 Likes