Sounds like a stupid question, but I have no idea how to make it work.

plankValue = script.Parent.pValue

if plankValue.Value == 0 then
	script.Parent.B.CanCollide = false
else
	wait(math.random(3,5))
	plankValue.Value -1 -- PoA;  How do I make it degrade 1 every 3-5 seconds.
end

if plankValue.Value == 4 then
	script.Parent.p4.Anchored = false
end

if plankValue.Value == 3 then
	script.Parent.p3.Anchored = false
end

if plankValue.Value == 2 then
	script.Parent.p2.Anchored = false
end

if plankValue.Value == 1 then
	script.Parent.p1.Anchored = false
end