For some reason the delay gets smaller and smaller every time i click it.Yea pretty much the title.Also no errors.
local held = true script.Parent.MouseButton1Down:Connect(function(player) local rem = script.Parent:WaitForChild("RemoteEvent") rem:FireServer() held = true while true do wait(.3) if held == true then if script.Parent.Text ~= "2" then script.Parent.Text = script.Parent.Text +0.1 end end end end) script.Parent.MouseButton1Up:Connect(function() held = false script.Parent.Text = 0 end)
Thank you Azarth.Figured out debounce and made it work. Here is my script.I tweaked some of it so i can add debounce to every one so im sure it deosnt get smaller.I know its messy.
local debounce = false script.Parent.Parent.bly.MouseButton2Down:Connect(function() script.Parent.Visible = true debounce = false wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 wait(.1) if not debounce then script.Parent.Text = script.Parent.Text +0.1 end end end end end end end end end end end end end end end end end end end end end) script.Parent.Parent.bly.MouseButton2Up:Connect(function() script.Parent.Visible = false script.Parent.Text = 0 debounce = true end)