Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i fix this error, i can't print out the "game.Lighting" size, how can i fix it ?

Im making a game and trying to check the game.Lighting size, i use :game.Lighting:GetChildren()" then print(#game.Lighting:GetChildren()) but it says this error, here's the error:

  ServerScriptService.Script:35: attempt to get length of a Instance value

also, i used an Instance.new('BoolValue") and set the parent to :game.Lighting" by script, is that where the error start? Someone help me fix it please

1 answer

Not completely sure what you're doing, but I'm pretty sure it's...

print(#game.Lighting:GetChildren()) 

You're getting the the length of the Lighting instead of its Children

3 comments

0

yes, im getting its length O.o

0

i really sorry about the thing that i typed wrong the code, it must be print(game.Lighting:GetChidlren()), but it prints out the error

0

thank you very much for uploaded this answer but i think i solved it ._.

This discussion is preserved as it was. New answers, comments, and votes are closed.