So this is the clientside of my recent GUI, I want to make it fire a remote when the debounce value is 0, and when it isn't, not fire the remote and instead send a notification and a warning in console. Here is my code so you can get the idea of it.
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
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)
How can I make this work?
