Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I,v loop only getting one instance over and over?

I have a loop here and every time it gets a single boolean value over and over. Im only going to reveal a part of the script, if you need more please comment:

Local W = game:GetService("Workspace")
Local weathered = function()
For I,V in pairs(W:GetDescendants()) do
if Wind ~= true then return end -- "Wind" is true atm
if V.Name == "Plant" then --[[ i believe i could make both true statements into one, im just too lazy to 
Rest of the code here, none is needed besides this short bit. --]]
end
end

Im fairly new and forgetting lots of things, can someone please help me on this?

1 comment

0

R.I.P. format

1 answer

Edit: fixed it. I was using a coroutine and swapped it to pcall, im an idiot. Not sure if it works efficiently now, gotta test

This discussion is preserved as it was. New answers, comments, and votes are closed.