I'm trying to :Destroy() all BodyGyro and BodyVelocity in the player's torso.
--Some variables to define the player and character local Movers = char.Torso:GetChildren() for i,v in pairs(Movers) do if v == "BodyGyro" or "BodyVelocity" then v:Destroy() end end
but it destroys all the children in the torso.
The reason your script isn't working because you are trying to compare an object to a string, also in your case you can't do v==blah or blah you'd have to do v==blah or v==blah2. So let's fix this.
First Let's bring in the correct part of your script.
for i,v in pairs(char.Torso:GetChildren()) do end
Now let's use the :IsA() function to check if the object we are on has a classname of either body gyro or body velocity and if so destroy
for i,v in pairs(char.Torso:GetChildren()) do if v:IsA("BodyGyro") or v:IsA("BodyVelocity") then v:Destroy() end end