Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to wait until the player stops holding down mouse one?

I'm making a new inventory system for my game and it needs to wait until the player stop holding down mouse one I tried to have

Mouse.Button1Up:Connect

But it dose not wait for them to stop holding down mouse one. (Note this is in a Module Script that gets information from a local script)

1 comment

0

Do Mouse.Button1Up:Wait() and then it will wait for the event to occure.

1 answer

✓ Accepted answer

I'm a little confused about what you are trying to do, but my suggestion is

Have a variable "mouseDown" set to true while the mouse is being held, and change it back to false when it's released.

Perhaps call the function when the mouse is pressed, and in your function have something like:

repeat wait() until mouseDown == false 

This will wait until the mouse is released

This discussion is preserved as it was. New answers, comments, and votes are closed.