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

Clone() not working cloning properly in GUI?

Hello, I am trying to do an in-game friendslist. However, the Frame doesn't want to clone for some reason. I've been trying to solve this issue for over 30 minutes and couldn't find a single solution. Here is the script;

local Players = game:GetService("Players")

local player = Players.LocalPlayer
local onlineFriends = player:GetFriendsOnline(8)


for i, friend in pairs(onlineFriends) do
	local ui = script.Parent:WaitForChild("Player")
	ui:Clone()
	ui.Parent = script.Parent
end

No errors, it just doesn't clone.

1 answer

✓ Accepted answer

The problem is that the cloned ui is nowhere. Try this:

local ui = script.Parent:WaitForChild("Player")
local uiClone = ui:Clone()
uiClone.Parent = script.Parent

1 comment

0

Thanks a lot, it looks like I got a bit messed up!

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