textLabel not updating

local rs = game:GetService("ReplicatedStorage")
local updatingInventoryEvent = rs.Remotes:WaitForChild("updateInventory")

local scrollingFrame = script.Parent.ScrollingFrame
local auraTitles = scrollingFrame.Frame:WaitForChild("AuraTitles")

local ownedTitles = {}

local function addTitle(effect)
    
    if ownedTitles[effect] then
        ownedTitles[effect] = ownedTitles[effect] + 1
        print(effect .. " count increased to " .. ownedTitles[effect])
    else
        ownedTitles[effect] = 1
        print(effect .. " is now owned")

        local cloneTitle = auraTitles:WaitForChild(effect):Clone()
        cloneTitle.Parent = scrollingFrame.Frame
        cloneTitle.Visible = true
        cloneTitle.Active = true

        local countLabel = cloneTitle:FindFirstChild("countLabel")
        if countLabel then
            countLabel.Text = ownedTitles[effect].. "x"
            print("count label cahnged")
        end
    end
end
    

updatingInventoryEvent.OnClientEvent:Connect(addTitle)

My countLabel is supposed to update to the value of ownedTitles[effect], but it stays at ‘1x’ even though ownedTitles[effect]'s value is changing

Here, you tell the program to update countLabel.Text only if ownedTitles[effect] does not exist. Therefore, you should not nest the condition inside the first condition, but rather put it outside, right after the else end statement.