#What did I do wrong?

9 messages · Page 1 of 1 (latest)

tepid wigeon
#

I’m just learning to script and I got an error saying,

“players.ajrbrown1.PlayerGui.CurrencyGui.Manager:6 attempt to index nil with ‘FindFirstChild’

It says it’s in reference to a previous line that goes,

“Local foodFrame = currencyHolderFrame:FindFirstChild(“Food”)

Anyone know what this wants me to fix?

weary pier
#

is 'currencyHolderFrame' an instance and does it have a child named "Food" ?

craggy needleBOT
#

studio** You are now Level 32! **studio

tepid wigeon
#

It does have a child named Food, how do I tell if it’s an instance? Like something that happens once?

weary pier
#

an instance is just anything in explorer tbh
Folder, Part, Script
all instances

#

What is on line 6?

tepid wigeon
#

Line 6 is the local food Frame line from my original question

trail path
#

It might not have loaded in the game by the time the script tries to find it.