So I have a script that when clicked, checks if a bool value is true or false. If its true then it prints "raisedtrue". If its false its prints "raisedfalse" however, when I run the script it just runs both at the same time and seems to ignore the if statement. does anyone know why?
local c = script.Parent.ClickDetector
local raised = script.Value.Value
c.MouseClick:Connect(function()
if raised == true then
raised = false
print('raisedtrue')
end
if raised == false then
raised = true
print('raisedfalse')
end
end)
