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

How do you send Mouse to server while FE is on?

I'm trying to send the player's mouse to the server from the client, but Player:GetMouse() doesn't work how do you solve this?

1 comment

0

You can't. Your not playing at ROBLOX's servers so ROBLOX's servers don't have your mouse.

1 answer

✓ Accepted answer

The function :GetMouse() can only be ran on the client, and you cannot send the mouse itself over to the server using a remoteEvent, but you what you can do is send properties of the mouse over through a remoteEvent to the server.

--localscript
local mouse = plr:GetMouse()
remoteEvent:FireServer(mouse.Target)

--server
RemoteEvent.OnServerEvent:connect(function(Player,target)
end)

In this example I am sending the mouse's Target over to the server from the client.

5 comments

0

You can also get the player's mouse through server by the player's equipped tool (which is why lots of planes require you to hold a tool to maneuver it)

0

Yes, you can't send the whole mouse along because it doesn't work. Instead send part of it "mouse.target" to the server script.

0

You could easily reassign the mouse properties to a dictionary and send that as if it were the Mouse object at that instance in time (it wouldn't self update to align with the mouse object)

0

can only be ran by the client*

0

@hiimgoodpack LOL didnt see that

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