Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I transfer something that's cloned into a different parent?

So I've been trying to do a data transfer of sorts by cloning a folder and moving it into another parent but when I do the transfer it takes the original folder as well out of the original parent because both folders have the same name.

SlotOne = script.Parent.Parent.Parent.Parent.Parent.Parent.Starters.StartersFrame.SlotOne
function onTransfer()
SlotOne.Appearance:Destroy()
wait(.1)
script.Parent.Parent.Appearance:Clone()
wait(.1)
script.Parent.Parent.Appearance.Parent = SlotOne
end
script.Parent.Parent.MouseButton1Down:connect(onTransfer)

Any suggestions?

1 answer

✓ Accepted answer

I am assuming you are trying to move line 5, so can't you just make a variable and then set that variable's parent to something else?Kind of like this.

Clone=script.Parent.Parent.Appearance:Clone()
Clone.Parent=SlotOne

I don't know if this is the problem, but try using variables more instead of going script.Parent.Parent.Parent.etc.

2 comments

0

It worked thanks for your help!

0

No problem

This discussion is preserved as it was. New answers, comments, and votes are closed.