Bool value acting strange

	if debounce == true then --if the cooldown is up, then

		if hasSword == false then --if the player doesnt have a sword
		
              --do stuff

		else --if the player already has a sword
			
			print("hi")

		end
	end

end)

It prints “hi”, even though when I’ve checked, the value is false. Why is it doing this?

The way I set up the variable, it was checking if it could find the value using :FindFirstChild(), which of course, it did. I needed to change it to “if hasSword.Value == true” instead.

Then that’s the problem.

hasValue is an instance, so it will never be a boolean.

hasSword can not be a boolean so this will always return false, and will execute “else” instead.

Did you do it already? And did it work?