.parent using a function

Alright, lets get straight to the case. i’m trying to achieve here, been scowering around trying to find a solution,

so what i have been trying is

local Frame = Library:New(“Frame”)
Frame.Parent = ScreenGui

Anyone knows how i do fill my function getting the stuff?
maybe returning the created item or something… i have no clue to be honest.

I’m pretty sure you’re trying to do a module here so

local module = {}

local function:New(arg)
  local new = Instance.new(arg)
  if new then
    return new
  end
end

return module

Or are you trying to get a frame from an already existing libary?

I just figured it out myself! but thanks :happy1: