Getmouse from differant client

How do i retrieve the mouse from a client from a differant client?
i’ve tried bindablefunctions but it won’t let me choose a specific client either
i’ve searched for a bit on the devforum without help
any help would be appreciated thank you.

1 Like

I think you should use the Server in the middle of them. I mean, Client asking Server whats the mouse.Something from another Client.

But, whats the purpose of this?

1 Like

i have a turret that i want to be client sided (for performance on the server, but it shows on all clients)
and i need the turret to always look at the players mouse but only a certain one
and thing is if someone joins the game it’ll error a shit load (whichz is easy to fix)

Have you tried using remotes to complete this task?

1 Like

i could try using a remote event to retrieve the mouse and then fire all clients repeatedly but i as wondering if any other solution was possible

As I said, its using Server for replication. A turret controled by a client, should fire a Remote to Server, Server should validate it, then replicate the movement so other clients can see it updating

1 Like

thanks, probably going to work was just wondering if i could do it any other way

1 Like

don’t fire the remote to the server(roblox limits amount of remote events a player can fire causing it to break) what you should do is have the server fire remote events to all the clients (connect a event in the script and have the server fire it)

You want to know the mouse cursor position, how you would know that if the script is server sided? Only client knows its cursor position. Firing from server to other clients to tell them the coordinates of the turret, but you dont have the coordinates in server…

As far as I understand there is a throttling system to prevent excessive RemoteEvent usage. If a player tries to fire too many RemoteEvents in a short period of time, their requests will be delayed or blocked until they fall within the allowed limit. Is to prevent players from overloading the server and causing performance issues and break it.

Additionally you should do sanity checks to prevent exploiters to spam the remotes or use them for advantage.


Try giving NetworkOwnership of the Tank/Turret to the client too.

it’s already solved, just clarifying for anyone who doesn’t know
used a remotefunction to get the mouse position fro mthe client and passed it through with a remote

Honestly that sounds even worse than others and my suggestions.
If you fire a RemoteFunction from server to client, there is a chance that client never replies due to disconnection or connection issues, causing server to crash, its stated in documentation that should not be used from Server to Client

Or you did this:
Server with a RemoteFunction fire client, Client respond using a Remote Event to server with the mouse position.

Still bad, cause theres no need to use a RemoteFunction for that, and the first step is useless, its more work for server constantly asking client for the mouse, and then receiving the data from client with another remote.


It was simplier just let client fire the remote to server, and server handle the position of the turret, or server fire remote to all clients to replicate the movement.

ive tried making it so the client asks the server for the position but when i did that the game started delaying my remotes since i was “spamming remotes” casung it just to not work at all

it’s a .renderstepped event since i want it to be client sided for optimization so it’s firing a remote 60 times per second but i can settle with it being serve sided.

i’m using an fps unlocker so it’s acutally firing 420 per second my bad.
i’ll just make it server sided :exploding_head:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.