#error PlayerGui.Inventory.InventoryScript:130: attempt to index nil with 'Text

35 messages · Page 1 of 1 (latest)

ruby saddle
#

code?

thorny hearth
#

wait

#

i reopening rb studio

ruby saddle
#

ok

thorny hearth
#

bug in this part

ruby saddle
#

When im scripting, the attempted to index with nil errors usually appear when something is wrong with a variable

#

what does scanItems() do?

#

so from what i understand scanItems returns a table

#

and that for loop checks that table

thorny hearth
#

ye

thorny hearth
ruby saddle
#

I cant find a declaration of countDisplay

#

try declaring countDisplay

thorny hearth
#

ok

ruby saddle
#

CountDisplay = game.StarterGUI:WaitForChild("Inventory"):WaitForChild("invFrame"):WaitForChild("Items"):WaitForChild("CountDisplay")

#

or something along the lines of that

#

or if CountDisplay is a child of invItem

#

invItem:WaitForChild("CountDisplay")

thorny hearth
#

ok

#

now it do this

ruby saddle
#

my bad, invItem is a table and tables dont have WaitForChild()

thorny hearth
ruby saddle
#

im perplexed

thorny hearth
#

when i buy item

#

it write this

ruby saddle
#

so what i see it prints: invItem

thorny hearth
#

ye

ruby saddle
#

my money is on CountDisplay not being related to invItem

thorny hearth
ruby saddle
#

i think i cant help you here

ruby bridgeBOT
#

studio** You are now Level 5! **studio

ruby saddle
#

since im pretty new