Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you do :GetMouse() from a server script..?

Asked by 5 years ago

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?

0
Simple, you can't. BashGuy10 384 — 5y
0
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() greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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)
0
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 iinaoriku 52 — 5y
0
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.) BashGuy10 384 — 5y
1
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 Luka_Gaming07 534 — 5y
Ad

Answer this question