#why is :Destroy() not working?

1 messages · Page 1 of 1 (latest)

uncut oxide
#

I call the function and it creates clones and does what I tell it to do but when I call the function again its supposed to destroy the clones but its not doing that and Idk why

hasty galleon
dull remnant
#

PLEASE format your code

wild venture
#

You clone the can parts whenever you fire the function. Yet only destroy them when equip1 == true

I’m assuming you do this:

fire function
Clone can parts
Move them
Fire function
Clone more can parts
Delete the additional clones

uncut oxide
#

yeah thats what the code was doing in the ss and so to fix it I tried doing "squareleft:findfirstchild("redcan1"):Destory()"

grand bladeBOT
#

studio** You are now Level 7! **studio

uncut oxide
#

but it didnt work and ive been trying to problem solve this entire time but I have no idea why its not working now but something weird keeps happening

#

the parent of the clone becomes the clone for some reason and I have no idea why

#

the parent of the clone has the arrow saying that it had children if I am looking at it but if I go away from it and look at something else the arrow go away and even when the arrow is there I cant see the children if I click it

uncut oxide
#

btw "squareleft" should be the parent of redcan1 cuz that was it is in the script

#

anyway im an idiot

#

was destorying the variable name of the clone and not the actual parts name