#I sometimes get this error and other times it just works

1 messages · Page 1 of 1 (latest)

final forum
#

10:07:26.475 Infinite yield possible on 'Workspace.Plants:WaitForChild("Plant Spawn Positions")' - Studio
The folder "Plant Spawn Positions" does exist within the folder plants which is within the workspace. Ive tried FindFirstChild, but that just stops the code. and gives this error: 15:53:02.400 Stack Begin - Studio
15:53:02.400 Script 'Players.Freddiegast.PlayerScripts.PlantsSpawning', Line 24 - Studio - PlantsSpawning:24
15:53:02.400 Stack End - Studio
if it helps, here is a snippet of my code
local NormalModels = AllPlantsFolder:WaitForChild("Normal Models")
local ShinyModels = AllPlantsFolder:WaitForChild("Shiny Models")

local SpawnPosFolder = Workspace
:WaitForChild("Plants")
:WaitForChild("Plant Spawn Positions")

local SpawnPoints = SpawnPosFolder:GetChildren()
local AvailableSpawnPoints = {}
local PlantToSpawnPoint = {}
local UnavailableSpawnPoints = {}

for _, point in ipairs(SpawnPoints) do
table.insert(AvailableSpawnPoints, point)
end

indigo dawn
#

thats a warning not an error. it just means it took longer than like 5 seconds to wait for it

brazen rune
#

If you're too far from the part you're trying to reference, the client won't see it in the workspace until you're close enough for it to load