Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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?

2 comments

0

Simple, you can't.

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()

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

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

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.)

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

This discussion is preserved as it was. New answers, comments, and votes are closed.