I am trying to make a script that clones a frame and makes the parent something in starter GUI. On Click function. I am not sure if I can do something like this.
Frame:Clone()
Frame.Parent =
Yes you can, when you clone something it copies the object, but it does not have a parent, meaning you would have to parent it
local Frame = script.Parent.Parent.Parent.Parent.Parent.ServerStorage.Data local Clone = Frame:Clone() -- clones it Clone.Parent = -- sets the parent, etc etc
You can also do;
local Frame = script.Parent.Parent.Parent.Parent.Parent.ServerStorage.Data Frame:Clone().Parent = -- you do not have to make the clone a variable, you can also set the parent from here
Instance:Clone() wiki link: https://developer.roblox.com/en-us/api-reference/function/Instance/Clone
Hope this helps
--what you'd need to do is something like this: local Frame = script.Parent.Parent.Parent.Parent.Parent.ServerStorage.Data local CloneParent = game.--enter desired parent here local CloneFrame = Frame:Clone() CloneFrame.Parent = CloneParent