Folder getting randomly destroyed?

I have a folder which all of the decals that are face ids in that folder (for my npc’s faces) which is in server storage but then I find out that after a bit of time playing the game I get this error saying the folder is not apart of server storage anymore its coming from all the npcs that needed it also the decals would be (cloned so I did make sure it wasn’t destroyed). I open find all/replace all and look for it saying folder:Destroy() I got no results I ran a virus scanner looking for a backdoor virus script or something I found nothing. What do I do?

(If this is in the wrong topic please kindly tell me)

if the script thats trying to access serverstorage is a local script, then that should be the problem, localscripts cannot access anything in serverstorage

Its all server scripts not local scripts I do know local scripts can’t access serverstorage

can u show script? and hierarchy of the folder if u want to

We need to see the code utilising this folder, but I would hazard a guess that, whatever you’re doing with the folder, you’re not cloning the contents but taking it with what script runs first.

But yes, do a search find all that accesses that folder and show us the code if nothing obvious stands out to you.

All npcs have this I have 4 npcs who use this script they use different faces its not like they all use the tired face.:
local npc = script.Parent
local faces = game.ServerStorage.faces
local head = npc.Head

faces.Tired:Clone()

head:FindFirstChild(“face”):Destroy()

faces.Parent = head

picture of the folder
image

ur moving the faces folder to the head, you should set the faces.Tired:Clone() to a variable

local clone = faces.Tired:Clone()
clone.Parent = head

becuz
local faces = game.ServerStorage.faces
faces.Parent = head

I don’t understand the faces folder is getting cloned to the head???

ur moving game.ServerStorage.faces to head

faces.Parent = head translates to game.ServerStorage.faces.Parent = head basically

wow… guess that was a scripting silly mistake…

1 Like

its all good haha
3o chrrsssss

You would be surprised how often this happens. You will make this mistake many times, as we all have.

Welcome to programming. :sweat_smile: