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

I can't check multiple int values in workspace?

I'm trying to do a script where when four values become one they will trigger something. I have this script under workspace.... Not sure if I am putting it somewhere wrong or if I need to change the script.

	if workspace.Value1.Value ==1 and
		workspace.Value2.Value ==1 and
			workspace.Value3.Value ==1 and
				workspace.Value4.Value ==1 then
					
		
end

The trigger works just fine

2 comments

0

Is it possible it could increase past 1?

0

The values stay at 1

1 answer

✓ Accepted answer
for i,v in next,(workspace:GetDescendants()) do
if v:IsA("IntValue") then
if v.Value == (" the value you expect to see ") then
-- do something with (v), aka the value instance. or whatever you were planning to do
end
end
end

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