What are the differences between using UserInputService and GetMouse?

I’ve been messing around with UserInputService as of recent. I’m kinda curious if there are any apparent differences between using UIS and GetMouse to detect the mouse’s location, input, target etc etc. Also, which one is better to use (only for the mouse stuff)?

1 Like

UserInputService and ContextActionService have almost replaced Mouse. but because mouse has features that they dont, like raycasting, it hasnt been decreapted yet. thats pretty much it. the documentation recomends you use those two other services instead of the Mouse equivelent of whatever your trying to do.

so only use Mouse whenever you cant use UIS and ContextActionService

3 Likes

Not much … Use GetMouse() for quick scripts involving mouse hover, click, or raycasting. Only works on the client. Not reliable for mobile/gamepad.

2 Likes

I’m pretty sure GetMouse() or just the Mouse object in general are deprecated

Raycasting? You are talking about Mouse.Hit and Mouse.Target, right?

2 Likes

Yes, im talking about those properties. But in reality, the engine makes the raycasting of your mouse and changes those properties for you. thats why i said it has raycasting as a feature

1 Like