Excessive remote firing issues, perhaps a different method?

First topic I’m posting, along with the first time I need assistance.

  1. What do you want to achieve?
    I’d like to figure out another form of method/route to retrieving a player’s mouse and camera properties to the server without having to consistently spam remotes.

  2. What is the issue?
    Basically my module script requires a constant update on a players camera cframe and mouse hit. In
    order to retrieve those variables, I consistently fire the same remote with different arguments as shown below.

     while game:GetService("RunService")["RenderStepped"]:Wait() do
     	DataEvent:FireServer("CameraCFrame", Camera["CFrame"])
     	DataEvent:FireServer("MouseCFrame", Mouse["Hit"])
     end
    

    RemoteFireSpamIssue

  3. What solutions have you tried so far?
    Solutions I’ve thought of, and acted upon, is remote events, bindable functions, and other random tests in which I can elaborate on if needed.

Well the simplest solution is to send less data. Add delay and only send that data a few times a second. You can make it look smooth still by tweeting it between sent positions.

1 Like

Ah, I understand. I’m not sure how I didn’t think of sending less data at more convenient times. For Instance:

while wait() do
 	DataEvent:FireServer("CFrame", Camera["CFrame"], Mouse["Hit"])
end

I’ll try it out and let you know the results.

One thing I can think of is set up a NetworkOwn’d part for both mouse and camera for each client. And then let the client move one part at the camera’s cframe and the other at the mouse’s cframe/position.

1 Like

That could potentially have replication issues despite setting network ownership, but I’ll try it and compare the first result I have, with this second one I’m trying, which would be this reply. I’ll post the results and their comparisons soon.

I’d like to thank both of you for your replies, they’ve helped me fix quite a bit, not just the one issue I asked for assistance on, but on many others as well. I’ve basically interpreted and integrated both answers, and It’s working quite well. But the big take away is @hkep and his reply, for his network ownership part answer helped big time.