Ok so, this is the line of code im having problems with:
local node = nodes[tonumber(previousNode.Name) + 1] or nodes.End
and here is the error:
6 is not a valid member of Folder "Workspace.Paths.Path1.Nodes"
There is no 6 in the folder indeed, so it should just use the nodes.End
instead because of the or
, right?
I tried using ifs but no results.
this is all in a function, only previousNode
in this line is a paramater. And it isnt nil
.