for i, v in pairs(workspace.GeneratedRooms:GetChildren()) do
randomRoom = math.random(1, #v) -- attempt to get length of a Instance value
end
if randomRoom and CanSpawnArcane.Value == true then
ArcaneModule.SpawnSpider(workspace.Arcanes.Nest, randomRoom)
print("Spawned Spider")
end
I don’t know how to fix this issue, if anyone knows please help. workspace.GeneratedRoom:GetChildren() is a model, if that helps.
(there is more script above, but i don’t think it needs to do with the problem)
Simple question that you should state its answer in your topic.
Anyways, the error describes itself, “attempt to get length of a Instance value”, the # character is typically used to get the length of an array (element count) or a string (character count) but you are instead, using the hashtag character with an instance value (something is not countable) willing to get a number.
Let me know the first question’s answer up there to be able to help you further.