Using ModuleScripts for functions relating to UIGridLayouts

Hello, I have an issue with using modulescripts. it is the following.
The usage
I would like the script to be able to access a cloned GUI locally and change depending on a table. The module script consists of two tables, one for each tab. Each tab should auto update when the player enters (This isnt an issue as the table will only update if the game is updated)
The issue(s)

  1. I need to locate the player’s ScreenGUI that has been cloned from StarterGui to PlayerGui
  2. I need a different function within the module script, “changetab” to access PlayerGui to change the visible boolean.
    The ModuleScript.
local UniFunctions = {}
local origional = script.Parent.Uniform
local repr = require(3148021300)

UniFunctions.alphacharlies = {
	PRMC = {"These are", 1, 5041554764},
	GreenBeret = {"alphas", 2, 5041553358}
}

UniFunctions.berets = {
	PRMC = {"these are", 1, 5041554764},
	GreenBeret = {"covers", 2, 5041553358}
}

function UniFunctions.alphacharliesappend(player)
    for i,v in pairs(UniFunctions.alphacharlies) do
        local tempstore = origional:Clone()
        tempstore.Parent = player.PlayerGui.ScreenGui.MainContainer.BeretScroll
        tempstore.Name = repeats
        for c = 1,3 do
            if c == 1 then
                tempstore.TextHolder.Text = repr(UniFunctions.alphacharlies[i][c])
            elseif c == 3 then
                local test = game:GetService("MarketplaceService"):GetProductInfo(repr(UniFunctions.alphacharlies[i][3]))
                print(test.Name)
                tempstore.ImageHolder.Image = "https://www.roblox.com/asset-thumbnail/image?assetId="..test.AssetId.."&width=420&height=420&format=png"
            end
        end
        repeats = repeats + 1
    end
end

So, in conclusion,

I would like that, when the player joins the game, the gui duplicates for the amount data in the list. in this instance, two duplicates, one being “PRMC” the other being “GreenBeret”. Once the function is called from a script (LocalScript would mean the function would not be able to access ServerStorage) the changes to take place. It was previously working so there is no issues within the code itself in terms of the data side of things, just the calling and duplicating that are the issues once I moved it to ModuleScript.

Thanks :slight_smile:

Adding a reply to see if anyone else can help?