Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

:Clone() Not cloning children?

Asked by
Laxely 3
7 years ago

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

0
Can you show us your setup and what is occurring through screenshots or a gif (LiceCam is a good application for screen recording gifs). M39a9am3R 3210 — 7y
0
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 Laxely 3 — 7y
0
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. M39a9am3R 3210 — 7y
0
Everything i'm using is anchored, I get what you're saying but i'm sure that's not the problem. Laxely 3 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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.

0
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 Laxely 3 — 7y
0
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 shadownetwork 233 — 7y
0
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 Laxely 3 — 7y
0
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 shadownetwork 233 — 7y
View all comments (8 more)
0
Yea, I'll probably do that in the future. My game is in really early stages of development. Laxely 3 — 7y
0
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. shadownetwork 233 — 7y
0
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 Laxely 3 — 7y
0
i think i'll just have to put everything in individually :/ Laxely 3 — 7y
0
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. shadownetwork 233 — 7y
0
You should either mark this as the answer or state why it isn't the answer. shadownetwork 233 — 7y
0
i have parts inside an other script i have and it works fine tho Laxely 3 — 7y
0
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. shadownetwork 233 — 7y
Ad

Answer this question