Hey! Can someone explain why this script isn’t working? It’s weird because when I set the value to false (look at the script) it works.
while wait(0.5) do
if workspace.Values.Start.Value == true then -- When I set this to false it works correctly
if script.Parent.Transparency == 0 then
workspace.Values.CameraJumpscare.Value = true
else
script.Parent.Transparency = script.Parent.Transparency - 0.05
end
end
end
You are constantly checking each 0.5seconds if a value called “Start” is true (placed in Workspace > Values), if its true, the code runs, if its false the code wont run. If you meant by “not working” that the code doesnt run.
while wait(0.5) do
if workspace.Values.Start.Value == true then
while true do
if workspace.Values.Start.Value == true then
if script.Parent.Transparency == 0 then
workspace.Values.CameraJumpscare.Value = true
end
else
script.Parent.Transparency -= 0.05
end
task.wait(0.5)
end