Hello all, I am working on a game script, in which the script chooses a random Part out of the "RoundSpawns" Folder.
I've used this exact same line of code for years, but all of a sudden it seems to be not working.
player.Character.HumanoidRootPart.CFrame = workspace.RoundSpawns[math.random(#roundTeleportsGC)].Position + Vector3.new(0, 5, 0)
Below is what it shows in the Output.
6 is not a valid member of Folder
Thanks in advance!

2 comments
I forgot to mention that I've looked at some DevForum posts and they seem to be using the exact same method as me, but it works for them.
Another thing to note is that sometimes it dosen't even say the correct number of items in the folder! There are 6 random teleports in the folder. Sometimes it'll show it as 2 or 3 for some reason.