Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 1 year ago

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?

0
R.I.P. format Partykidcrazy 15 — 1y

1 answer

Log in to vote
0
Answered by 1 year ago

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

Ad

Answer this question