Hi, I tried to do a few scripts that are based on changing values, but the problem is, not any of them detected that the value has changed when it did change.
Here's one of the them:
while true do
wait(script.Parent.Parent.Open.Changed)
if script.Parent.Parent.Open.Value == true then
print("value changed")
wait(2)
script.Parent.Color = Color3.fromRGB(0,255,0)
script.Parent.SurfaceLight.Color = Color3.fromRGB(0,255,0)
wait(14)
for i= 0,5 do
script.Parent.Color = Color3.fromRGB(255, 0, 0)
script.Parent.SurfaceLight.Color = Color3.fromRGB(255, 0, 0)
wait(0.2)
script.Parent.Color = Color3.fromRGB(0,0,0)
script.Parent.SurfaceLight.Color = Color3.fromRGB(0,0,0)
wait(0.2)
end
wait(2)
script.Parent.Color = Color3.fromRGB(255,255,255)
script.Parent.SurfaceLight.Color = Color3.fromRGB(255,255,255)
else
print("value didn't chaged")
script.Parent.Color = Color3.fromRGB(255,255,255)
script.Parent.SurfaceLight.Color = Color3.fromRGB(255,255,255)
end
end
The prints were show if the value did changed but it kept printing "value didn't changed". Any help is appreciated, thank you.
Edit 1: even with the shorten Open.changed:connect() method: the script doesn't detect the bool's value change.

4 comments
Thanks for this shorten method! But the script still doesn't detect the change. I'm going to start thinking that I'm cursed lol.
That method does work. The value isn't being changed or your if statements are running because you're checking for the wrong thing
Make you you are checking if everything is correct and is there script printing "Changed"
After a lot of test, it did worked! I don't know why, but I should fix my studio. Thank you so much for your help!