#All childeren in a folder are destryoing when I start the game
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **
Where is the folder located
use AncestryChanged
I did
what it said
let me find whole log
[DEBUG]: 5 - Server- Script:6
ServerScriptService.Script:7
print(debug.traceback()) returned empty
did you download anyting from toolbox that contained scripts?
Yes but I deleted them all
try debug.traceback("Traceback", 2)
Delete: 6
Traceback
Delete: 2
Traceback
(...)
I'm not sure if I'm using it correctly, how should I use it?
local function debugDestroy(instance)
local oldDestroy = instance.Destroy
instance.Destroy = function(self)
print("debug here:", self:GetFullName())
print(debug.traceback())
oldDestroy(self)
end
return instance
end
local folder = workspace:WaitForChild("your folder")
for _, child in ipairs(folder:GetChildren()) do
debugDestroy(child)
end
put this in LocalScript or ServerScript
alr
Destroy is not a valid member of Part "Workspace.SellAreas.6" - Sunucu - Script:4
Stack Begin - Studio
Script 'ServerScriptService.Script', Line 4 - function debugDestroy - Studio - Script:4
Script 'ServerScriptService.Script', Line 15 - Studio - Script:15
Stack End
What does it mean
uhhh
local folder = workspace:WaitForChild("SellAreas")
for _, child in ipairs(folder:GetChildren()) do
child.AncestryChanged:Connect(function(_, parent)
if not parent then
warn("deleted -> ", child:GetFullName())
warn(debug.traceback())
end
end)
end
last try
can you check if it's only "parts" that are getting destroyed
It is yes
** You are now Level 2! **
deleted -> 6 - Sunucu - Script:6
19:31:34.770 ServerScriptService.Script:7
- Sunucu - Script:7
19:31:34.770 deleted -> 2 - Sunucu - Script:6
19:31:34.770 ServerScriptService.Script:7 - Sunucu - Script:7
19:31:34.770 deleted -> 3 - Sunucu - Script:6
19:31:34.770 ServerScriptService.Script:7 - Sunucu - Script:7
19:31:34.770 deleted -> 4 - Sunucu - Script:6
19:31:34.770 ServerScriptService.Script:7 - Sunucu - Script:7
19:31:34.770 deleted -> 1 - Sunucu - Script:6
19:31:34.771 ServerScriptService.Script:7 - Sunucu - Script:7
19:31:34.771 deleted -> 5 - Sunucu - Script:6
19:31:34.771 ServerScriptService.Script:7
alr
still the same
oh wait
my bad
okay still the same
deleted -> p6 - Sunucu - Script:6
19:44:14.221 ServerScriptService.Script:7
- Sunucu - Script:7
19:44:14.221 deleted -> p2 - Sunucu - Script:6
19:44:14.221 ServerScriptService.Script:7 - Sunucu - Script:7
19:44:14.221 deleted -> p3 - Sunucu - Script:6
19:44:14.221 ServerScriptService.Script:7 - Sunucu - Script:7
19:44:14.221 deleted -> p4 - Sunucu - Script:6
19:44:14.221 ServerScriptService.Script:7 - Sunucu - Script:7
19:44:14.221 deleted -> p1 - Sunucu - Script:6
19:44:14.221 ServerScriptService.Script:7 - Sunucu - Script:7
19:44:14.222 deleted -> p5 - Sunucu - Script:6
19:44:14.222 ServerScriptService.Script:7
no idea
it's so ridiculous
also I'm just a beginner, maybe some experienced guy could help
maybe make a new folder
all i can see is a script being fired way early on and deleting parts in pairs
Could this be due to a code I wrote?
can you share
I have codes with ClearAllChildren but even if I delete them the same result
sure dms?
silly question but are all your parts unanchored and cancollide false?
@limber sparrow
also debug.traceback will only give u traceback from the script that detected the change not the script that actually destroys it
Let me check
Yes
Wait
It should be anchored?
How did I forget to anchor...
Working now thanks.
They should already be anchored, but why do they disappear when they are not anchored? @lethal glacier
I gave 3 hours for this lol