Conditional Statement only returning True

local t = ui.Visible == true and false or true
		v.Active = t
		v.Visible = t

No matter what Visible is equal to, t always returns true. Anyone know what’s wrong?

Nvm. I found the solution. There was a problem with a variable declaration. hehe

(Update: Oops. No i didn’t. It still doesn’t work.

Try this.

local t = if ui.Visible == true then true else false

Oh. thanks! But I solved it with a much messier method, hehe.

local function V(_) if _.Visible == true then return false else return true end end
	local s = ""
	for _,v in pairs(ui) do
		local t = V(v)
		v.Active = t
		v.Visible = t
		s = s..v.Name..tostring(t)