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

How do I index a clone with a parent?

I'm making a script and I'm trying to clone something and give it a parent, but whenever I click the button to clone, Output says "Attempted to index clone with PlayerGui" How do I give my clone a parent?

3 comments

0

Can you edit your question to include the code?

0

script

1

Don't use a local script to clone things and use it to manipulate the server. Use remote events/functions for that. If you MUST edit something with a local script, make sure that it's actually rendered for the client first before trying to manipulate it. WaitForChild is a good example.

1 answer

An example on how I always do it.

local clone = Object:Clone()
clone.Parent = workspace

I don't know how you are doing it since you haven't included your code. But I hope this helps.

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