I made a part and put in a script and a value. I wanted something to happen if the value got to zero but whenever it got to zero nothing happened. I put this in the script
script.Parent.Touched:Connect(function(hit)
if script.Parent.Value.Value > 0 then
if hit.Parent.Name == "Hammer" then
script.Parent.Value.Value = script.Parent.Value.Value - 10
else if script.Parent.Value.Value <= 0 then
print("k")
end
end
end
end)
it didn't work I think it is because of the second and fourth line. To fix the problem I tried indenting the 2 lines below the second line but it still wouldn't work. I also tried indenting the second last line none of them worked.

5 comments
i assume because the elseif that cecks if its zero gotta match up with the first if statment that checks if its bigger than zero
and youre putting that elseif with the hamme check, which is wrong i guess
what? how do I do that?
On the second line, try using == instead of >, you are detecting if the value is higher than 0 if you use > instead of ==
oh I see anything else?