If example == false then statement not working

Hello, I’m trying to fix a glitch in my game by checking if a boolvalue is false or true. I can not seem to get the code working. The code is located inside a tool.

script.Parent.Activated:Connect(function()
	if game.ReplicatedStorage.elevatorinuse == false then
print("beans")
		end
end)

The old code without the if statement worked before. I also tried with if then do but that also didn’t work.

script.Parent.Activated:Connect(function()
	if game.ReplicatedStorage.elevatorinuse == false then do
print("beans")
		end
	end
end)

It’s a BoolValue? You forgot .Value.
if game.ReplicatedStorage.elevatorinuse.Value == false then

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.