So I am using a server side script that is placed in serverscriptservice. That being said means I can't use

  1. local Players = game:GetService("Players")
  2. local localPlayer = Players.LocalPlayer -- Requires LocalScript
  3. local mouse = Player:GetMouse() So I was wondering If I there was a way for me to get the players mouse position while the script is in serverscriptservice because I cant really move the script without breaking it because it spawns blocks after getting the signal from a remoteevent

9 comments

0

u simply cant

0

the mouse doesnt replicate to the server, so it is impossible without the use of a local script

0

You can't without a RemoteEvent. In fact, you can't send the mouse instance over the event because it's non-replicated. You'll have to send the mouse's position over the event

0

You cannot get the UDim2 of a mouse in a server script, hence the name, "server," client handles ALL mouse movement, primary and secondary button, and yes, movement, because that is what the LOCAL side of ROBLOX's client and server set up. I'd offer a answer for your question using a potential remoteevent set up, however your question is quite vague to go off of.

0

I just wanted to know if it was possible. Thanks for answering my question now I know where I have to go for my scripting

0

use remote events to transfer the position of a mouse to the regular script

0

Im trying but i cant figure it out which is why I asked another question

0

@Dev_Unreal Wrong. The mouse itself cannot be sent over but things such as Mouse.Hit.P can be sent over.

0

So much correction.Can someone close this because Ive gotten my anwser