Hello, I've been trying to clone a part with other parts and lights inside the it and for some reason it's only cloning the part and none of its children. This is very frustrating and I don't want to individually clone each child. Any sort of help would be appreciated
:Clone() Not cloning children?
1 answer
https://gyazo.com/8701a326f048841bbbfb9ac0dee40728
A Part should never be in another part. R.Lua doesn't accept this as valid so :Clone() won't clone the second part.
12 comments
but its not cloning anything at all inside the part, i have a pointlight inside the part too and it's not cloning that either
Try removing the second part then see if it clones the PointLight. Also are you cloning from one service to another? For example Game.Workspace to Game.Lighting. If so what service are you cloning from and what service are you cloning to
i took the part out of the other part and it seems to be working now, it cloned the point light and all the parts, if i have any other problems i'll let you know :D thanks a bunch. Also i was cloning from a local script in the backpack to game.workspace
I would suggest that you rewrite your LocalScript to use RemoteFunctions and RemoteEvents so that it will be compatible with FilteringEnabled. Wiki links: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial http://wiki.roblox.com/index.php?title=Client-Server_Model_and_FilteringEnabled
Yea, I'll probably do that in the future. My game is in really early stages of development.
Start early and you won't have to recode it later. Thats what I'm having to do with all my old games. It takes longer to recode it then it would if I had just used it in the first place.
ugh it's not working again, i have all the parts inside one script, the script is a kamehameha script and it works fine the first time then the second time none of the parts have meshes in them or point lights
i think i'll just have to put everything in individually :/
Parts are not suppost to be in Scripts either. They should be in Models, Folders, or the equivent. If you put them in a Folder or Model :Clone() should work just fine.
You should either mark this as the answer or state why it isn't the answer.
i have parts inside an other script i have and it works fine tho
Interesting. Roblox doesn't support parts in scripts but it ends up that it works sometimes? I still wouldn't recommend it since it isn't supported and might stop working with any roblox update.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Can you show us your setup and what is occurring through screenshots or a gif (LiceCam is a good application for screen recording gifs).
https://gyazo.com/8701a326f048841bbbfb9ac0dee40728 as you can see here the ball is inside the other ball, when i try cloning just the ball and putting it inside the players torso it appears like this https://gyazo.com/45c2fff01c76283554f3b2769eb6e526, when it's supposed to look like this https://gyazo.com/50c3617e1cea22c8c42b10da6b76a287 i don't want to show anyone the whole script since you could
Do you have a weld on the second ball part or are both ball parts anchored? Can you provide details on that part? Edit: It looks to be for a throw-able ball. What's happening is Roblox's physics are tossing the second ball into infinity thus leading to its removal. You neglected to weld the second ball to the first.
Everything i'm using is anchored, I get what you're saying but i'm sure that's not the problem.