How would I get a part to move to the cursor through a server script?

How would I get a part to move to the player(s) cursor? I’ve looked at like almost every single post and have not found a solution. All I have done is get the cursor in a server script, but it doesn’t work since all it says is “Attempt to index nil”. I’ve tried through a Local Script and then to a Server Script but it’s not what I am looking for. Anything will help, thanks!

The server doesn’t have a mouse attached to it, so trying to get a cursor confuses it. What you need to do is get the information in a local script, and pass the cursor position through a remote even to the server. If you don’t need any other player to see it though, you can just keep it all in the local script.

Alright, that makes sense. Thanks for the help.