:GetDescendants returning nil

Hello Developer! Nico here once again.

Ima keep this clear and simple, i am not using any pc rn and i really need to test something i’ve been making, so basically i forgot the name of the script i’m looking for (sounds very stupid from my part, i know), and every time this happens to me i use :GetDescendants to get every script name, but for some reason, this time it returns nil even if i wrote the code correctly.

Can anyone tell me what’s happening and if it’s a typo error?

Any help is appreciated :pray:

Greetings, Nico.

Here’s the pic with the proof:

probably because you did it wrong way?

the proper way of using :GetDescendants is execute this line :
for _, v in pairs (game.workspace.Event.Event:GetDescendants()) do print(v) end
but instead you did :
for _v in pairs (game.workspace.Event.Event:GetDescendants()) do print(v) end
you’re missing a comma “,” between _ and v which leads to that issue

1 Like

Oh my god, how did i not notice that :sob:

Thank you so much lil bro, i can’t believe i did not notice about it. Maybe because i’m on mobile. :pray::pray::pray:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.