Script Prints E All The Time

So i have a script where when i clicked it makes empty true
so when it is unequipped and not empty it should print e (it does), but when it is unequipped and empty is true it should print d but it still prints e. How can i fix it?

local empty = true
local eq = false



script.Parent.Activated:Connect(function()	
	empty = true
	print("fired")
end)


script.Parent.Unequipped:Connect(function()
			eq = false
			if not eq and not empty then
			print("d")
		else
			print("e")		
	end
end)




script.Parent.Equipped:Connect(function()
	eq = true	
end)

I’m sort of confused, I think your problem is that both conditions are always true.

  • not empty
  • empty is true

Those statements are actually the same exact thing, so I can see why this always yields you the same output result.

OOPS LOL HAHAHA I JUST READ THAT
thanks man lol

1 Like