So I have this code;

batchbutton.MouseButton1Click:Connect(function()
print(batchdebounce)
if batchdebounce == 0 then --> This should stop the code below if the value isn't 0 and skip to line 16, but it doesn't if the server changes it.
RippleEffect(batchbutton, m.X, m.Y)
warn('ADM --> Starting batch...') 
revent:FireServer(donutcode)
wait(2)
warn('ADM --> Batch successfully started.') 
SG:SetCore('SendNotification',  {
Title = 'Doughnut Machine';
Text = 'Batch successfully started.';
    })

    else

RippleEffect(batchbutton, m.X, m.Y)
warn('ADM --> You need to wait nil seconds to start a new batch!') 
SG:SetCore('SendNotification',  {
Title = 'Doughnut Machine';
Text = 'You need to wait nil seconds to start a new batch!';
})
end
end)

What happens if the server changes it is it functions as normal even though it should skip to line 16, but if I change the value to 1 for example before hitting play, the code skips to line 16. How can I fix this? Do I need to use remotefunctions? (please don't tell me that's what)