Checking if one elements text is something else than others

It returns the first value instance which has a value different from the others in the folder.

1 Like

I just need it to return true if a text is different or false if it isnt

Then change the return statement to return true instead.

Should be fairly self-explanatory.

Yes, but the thing is how do I make so it checks the text of the text label? I’m pretty sure it doesn’t do that right now.

local function stopAtDifferentValue(f) --"f" is a folder of value instances.
	local constantValue = nil
	for _, valueInstance in ipairs(f:GetChildren()) do
		if valueInstance:IsA("ValueBase") then
			if not constantValue then
				constantValue = valueInstance.Value
			else
				if constantValue ~= valueInstance.Value then
					return true
				else
					return false
				end
			end
		end
	end
end