local v = game.Workspace.AV
script.Parent.Touched:Connect(function()
wait() 
    if v.Value ~= 1 then
 v.Value = 1
     end
end)

That's the script, the value "v" is being changed by another script.

3 comments

1

This isn't a loop? This checks if the value isn't 1 then it's going to change it to 1 when the part is touched. Include the other script or elaborate what you want it to do.

0

You should use "if v.Value =< 1 then". It should work I think.

0

Oh my bad, this works when I touch it an object it changes the value, it works for the first 2 times and then it stops working but prints after “if v.Value ~= 1 then”.