I want to get all the "InDungeon" bool value which is located in every player, and I'm trying to set Value to true if one of the "InDungeon" value is true, and set Value to false if every "InDungeon" value is false
while wait() do
for i,v in pairs(game.Players:GetDescendants()) do
if v.Name == "InDungeon" then
if v.Value == false then
script.Parent.Value.Value = false
print(v.Value)
else
script.Parent.Value.Value = true
end
end
end
end

4 comments
You could do if v:IsA("BoolValue").
and what would that change?
It just checks if the chosen object is a certain class
right that doesn't really do anything but breaks it because I have other bool values inside of player as well. I found another way to approach my objective so this isn't really needed