#Anyone know how to detect if Mouse1 is held down instead of clicked?

1 messages · Page 1 of 1 (latest)

waxen sky
#

Im trying to check if mouse1 is held down, not clicked on a part. The script is a regular script inside the part im checking this for. I cant find anything on it on google.

jagged kiln
#

To detect if a player is holding an input, you need to use a services like: UserInputService, ContextActionService, and PlayerObject:GetMouse(). Though I'd prefer using UserInputService.

To Use these services correctly, you would need your script context to be client sided so Roblox can detect actual input detection

waxen sky
#

I see

#

So i would need a remote event then

unborn oracle
#

uis.inputbegan / inputended

jagged kiln
waxen sky
#

thats annoying, thanks

jagged kiln
#

Yeah

#

Also @waxen sky

#

For better help please send code unless you're asking a logical problem like this(ish)

waxen sky
waxen sky
#

I didnt feel the need for this one since i didnt know the code for it in the first place.

jagged kiln
waxen sky
#

np

jagged kiln
#

Plus ur s1 so you're immediately below me (not ego)

cerulean vale
#

uhh

#

you know you can just

#

use .InputBegan and .InputEnded, right?

#

no wait actually nvm

unborn oracle
cerulean vale
unborn oracle
cerulean vale
#

oh you mean that he shouldn't use it

#

alr

#

would those events still work tho

#

or do you need to do Snicka's method

unborn oracle
#

yep, but it's more involved since clickdetector gets sent to server, uis does not so you have to do that part manually with remotes

#
  • mouse ray