I am making a gun and I need it to make it FE. Inorder to do that, I must do :GetMouse() from the server. How do I do this?
How do you do :GetMouse() from a server script..?
1 answer
If you want to make a gun for FE then you are probably using Remote Events and through the remote event fireserver(Mouse.Hit) on a local script and then in the serverscript the first parameter is always a player so it would look like
Local Side
Remote:FireServer(Mouse.Hit)
Server Side
Remote.OnServerEvent:Connect(function(player,Mouse)
print(Mouse.Position) -- You got your mouse
end)
3 comments
It says origin is not a valid member of cframe, this script is being used for arm rotate when they look up and down BTW
You can't get the mouse from a server script, your best chances are to send the mouse positions(mouse.Hit.p) to the server.(I've wrote several FE gun scripts before, and when i try to getmouse from a server script. it errors.)
It because you can't getmouse from server-side because YOU CAN't because the input is from the device ur using which is the client
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Simple, you can't.
You don't need to get the mouse from a server script, there is always another way, get the thing you are doing from the server script... mouses cannot be passed as an argument through FireServer()