Any way to get the mouse on the server?

Hello,

I am trying to challenge myself to use just a script to make a tool. But there is a problem I can’t figure out.
How would I get the player’s mouse in a Script and detect where it clicked.
I have tried putting a tool.Activated event in a tool.Equipped and passing the mouse parameter but that just did not work. I have seen other forum posts saying it’s better to use RemoteEvents but I just wanted to make sure if there weren’t any other ways of doing it since I am scripting a tool.

Thanks!

There isn’t any way, and most importantly couldn’t be.

Player input is always received on the client, as that’s where the input originates, and should be validated/handled on the server. Remotes are your friend here, use them well.

2 Likes

Would there be a way to only use a script to detect where the mouse hit?

No - the mouse is a non-replicated object and there’s no way that the server or other clients will access it, and there never will be. Your best bet is using remotes

2 Likes