Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is Mouse or UserInputService more efficient?

Asked by 4 years ago

I was wondering if I didn't need all the things UserInputService provides should I use Mouse for ButtonDown or would UserInputService be more efficient?

2 answers

Log in to vote
0
Answered by 4 years ago

If you're talking about Mouse.Button1Down then I don't really see why not but I'd suggest using UserInputService anyways because if you ever plan on expanding you won't need to convert it and I personally think it's a good habit not to use Mouse Events over UserInputService.

If you're talking about Mouse.KeyDown then use UserInputService. Reason being Mouse.KeyDown is deprecated and honestly, it will probably be removed in the future.

0
what reset said is true. use UserInputService's InputBegan. You can do a lot more with it and mouse version is deprecated. royaltoe 5144 — 4y
Ad
Log in to vote
0
Answered by
SioZex 15
4 years ago

Either would work but on very rare occasions or situations mouse may provide an error, it is very rare but I would still recommend UserInputService just to be certain.

Answer this question