I have a game and when you click a button it gives you money but I don't want people to anuse it with autoclicker. I have tried many different things but this is the main one:
bitbtn.MouseButton1Click:Connect(function()
local anticlick = tick()
if tick() - anticlick < 0.3 then
print("Clicked: "..tick() - anticlick)
elseif tick() - anticlick > 0.3 then
print(tick() - anticlick)
playerData.Bitcoins.Value = playerData.Bitcoins.Value + 5
updateData()
end
end)
It just comes up with something along the lines of: Clicked: 1.6689300537109e-06 no matter how fast it is clicked ( I tested an auto clicker ) and i'm out of ideas so if someone could help me fix this or has a different method please answer or comment.
~Ki_ngPhantom

1 comment
use debouce