Attempt to concatenate string with nil

So I have a module script that holds all the items’ information on it.
image
Module Script Contents:
image
I want to pull it and I wanna change the text of a text label. But I keep getting this error. I have tried to fix this so many times but it always resulted in other issues.


Does anyone know how to fix this?
image

this is because it is inside another table. you need to specify which ranklevel table it is. such as “Newspaper” or “Gascan”

yeah i just realised this when i posted it.[works below]

1 Like

You should probably have the Module script a set value like this:

local ItemsRanksnPricing = require(game.Repl **bla bla bla**,10)

Then have your other values.

local Newspaper = ItemsRanksnPricing["Newspaper"]

The reason it’s returning nil is because you’re trying to get “Cost” which is a value in the “GasCan”/“Newspaper” table.