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

how to get a player's mouse with Filtering Enabled?

Asked by
wookey12 174
6 years ago

i was making a script where when a player clicks the textbutton, a blueprint of a block (the shape of the block, just half transparent and blue) will follow the player's mouse. i got it to work in test mode, and decided to test it in a server. all the part does is move to the center of the map, and stay there. i figured out that the problem was that i can't get a players mouse with a RemoteEvent

game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function(plr)
    local mouse = plr:GetMouse()

does anyone know how i can accomplish this? i found another question on this site related to mine, and said to try using RemoteFunctions. i have some what of an idea on what they do, but do not know how to use them, or how they could help this situation in any way.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

The server can't access any players' mouses

It can't. For any reason you're trying to get the mouse on the server, you don't need to. If you want what the mouse is pointing at, use a remote function to retrieve that information.

You can't return the mouse in a remove function, because it'll turn into nil when it tried to get sent to the server. Send the information you want from the mouse, but not the mouse itself.

0
oh yeah.. that makes sense... wookey12 174 — 6y
Ad

Answer this question