Hi! I wanted to make game setup system, But I ran into this problem. When I was making the staff adding system, It worked but it didnt clone. Any solutions?
This is the script. (local btw)
local Staffs = {}
script.Parent.ScrollingFrame.Template.Visible = false
script.Parent.Add.Activated:Connect(function()
game.ReplicatedStorage.CheckUser:FireServer(script.Parent.Holder.Text)
game.ReplicatedStorage.CheckUser.OnClientEvent:Connect(function(User)
if User then
if table.find(Staffs,User.Name) then return end
table.insert(Staffs,User.Name)
print(Staffs)
else
warn("USER NOT EXIST!")
end
end)
end)
while wait() do
for _,staffn in pairs(Staffs) do
if script.Parent.ScrollingFrame:FindFirstChild(staffn) then return end
local Using = script.Parent.ScrollingFrame:WaitForChild("Template"):Clone()
Using.Visible = true
Using.UserName.Text = staffn
local Content, IsReady = game.Players:GetUserThumbnailAsync(game.Players:GetUserIdFromNameAsync(staffn),Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size420x420)
if Content then
Using.UserImage.Image = Content
end
Using.Name = staffn
end
end
