I am aware that you can use UserInputService.InputBegan to tell if a mouse button has been clicked but I am unaware if you can use it to tell if the mouse is up. Would I use InputEnded?
To achieve this you can use InputEnded as shown here:
local clickHolding = true --Just for example UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then clickHolding = false end end)
or you could ignore user input service and use
local plr = game.Players:WaitForChild("LocalPlayer") local mouse = plr.GetMouse() mouse.Button1Down:Connect(function() -- what happens when player holds down left button end) mouse.Button1Up:Connect(function() -- what happens when player releases left button end) --You could use to do the right button, use --Mouse.Button2Down:Connect(function() --for right button down