so basically ive got a terrain generation script, the terrain is split up into chunk folders and i need to access a part from a chunk the code goes something like
Land:FindFirstChild(hpos..""..wpos..""..lpos):FindFirstChild(h..""..w..""..l)
just doing
Land:FindFirstChild(hpos..""..wpos..""..lpos) returns a value and ive double and triple cheaked it should work but it returns nil ?
help? its kinda needed for my game given the millions of parts when i generate the terrain fully
From what I’ve understood you can try to Use 2 variables
local chunk1 = land:FindFirstChild(name of the chunk) local objectinchunk = chunk1:FindFirstChild(name of the object)
Obviously you need to format it correctly and change the variables to whatever you want but that’s the basic idea.
I believe in this case, what you are doing has an alternative:
local Child = Land[hpos.." "..wpos..""..lpos][h.." "..w..""..l]
I believe that should work, if it doesn't then looping is another way..
Also, maybe it is returning nil because there is no gap between "".
Also yes, what Glacitron said should work.