So for example i need to check if there's a certain value inside a part in order to fulfill the if condition inside a script. How do i do it?
There's an :IsA() function for every object in Roblox.
Go through the children and check if the object you're looking at is the object type you're looking for
For example, if you're looking for all the parts inside of a model:
for _, child in ipairs(game.Workspace.Model:GetChildren()) do if(child:IsA("BasePart"))then print(child) end end