I need an event for when (left) mouse button is starting to press and when it releases.
If you need more than this, I want to make a mechanism of holding a button with progress bar increasing...
Sorry, IK I'm badly hurting english.
Edit: it shouldn't be InputBegan, but something in kind: if mouse.Pressed == true, because I need to use this IF in while loop
The events you are describing are Button1Down
and Button1Up
. Here’s an example.
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:Connect(function() end) Mouse.Button1Up:Connect(function() end)
Keep in mind the mouse is client sided, so attempting to use :GetMouse() on the server will throw an error. Good luck!