How do i get a value in inventory

So im making if a player buys a title a string value gets added to their inventory of the titles name then their title gets added above their name but i can’t figure out how to get that added stringvalue.
here is the script

                     if player.Inventory == "" then
						if char.Head:FindFirstChild("BillboardGui") then
						else
							lowertext.Text = player.Inventory.Value --This is that the text will say.
							lowertext.TextColor3 = Color3.fromRGB(103, 24, 245) --This is what the color of the text will be.
						end

I’m confused, is “Inventory” a value you added in the player?

yes, its a folder added to the player

You can make a server script using this code:

And also I am assuming that you will only have one string value inside inventory at a time, if not, please respond.

game.Players.PlayerAdded:Connect(function(player)
	local inventory = "your inventory folder direction here"
	player.CharacterAdded:Connect(function()
		for i,v in pairs(inventory:GetChildren()) do
			if v:IsA("StringValue") then
				--your title change code here, change title to v.Value
			end
		end
	end)
end