Clone frame error

Hi,

I am trying to make a clone of a frame in PlayerGui but I am getting the error “clones is not a valid member of PlayerGui” last line below when trying to set the clones location.

I have created a folder called clones and can see the folder at runtime in the correct location.

– Get the PlayerGUI Root
local Players = game:GetService(“Players”)
Player = Players.LocalPlayer
PlayerGui = Player.PlayerGui
local START_POSITION = UDim2.new(0, 0, 0, 0)
local GOAL_POSITION = UDim2.new(1, 0, 1, 0)
local original = PlayerGui.testgui
local copy = original:Clone()
– error below clones is not a valid member of PlayerGui “Players.CanterCrow.PlayerGui” - Client - LocalScript:13
copy.Parent = PlayerGui.clones

Try waiting for the clones folder, maybe it hasn’t replicated to your client yet

copy.Parent = PlayerGui:WaitForChild'clones'

Thanks that was the issue, but now getting an error that I cant set the position of the clone, last line of the script below

Position is not a valid member of ScreenGui “Players.CanterCrow.PlayerGui.clones.testgui”

– Get the PlayerGUI Root
local Players = game:GetService(“Players”)
Player = Players.LocalPlayer
PlayerGui = Player.PlayerGui
local START_POSITION = UDim2.new(0, 0, 0, 0)
local GOAL_POSITION = UDim2.new(1, 0, 1, 0)
local original = PlayerGui.testgui
local copy = original:Clone()
– clones is not a valid member of PlayerGui “Players.CanterCrow.PlayerGui” - Client - LocalScript:13
– copy.Parent = PlayerGui.clones.Parent
copy.Parent = PlayerGui:WaitForChild’clones’
local function callback(state)
if state == Enum.TweenStatus.Completed then
print(“The tween completed uninterrupted”)
elseif state == Enum.TweenStatus.Canceled then
print(“Another tween cancelled this one”)
end
end
– Initialize the GuiObject position, then start the tween:
copy.Position = START_POSITION

“copy” is a clone of “testgui” which is a ScreenGui from what I can see. They don’t have a Position property