Title explains it, I basically need a way to detect if a player has pressed a Key on the server side. I don’t wanna use remote events as they for some reason cause lag but I’ll use them as a last resort
Not possible, send your request instead. If this is for experimentation, consider using an UnreliableRemoteEvent.
Watched a video to learn about those and forgot everything in 5 seconds
thanks for the reminder
Do NOT use an unreliableRemoteEvent for precision needs such as a key press. Look into udp/tcp networking for specifics, but in short a remoteEvent will guarantee a successful server connection, while unreliable will not.
Yeh I know this, Im still getting the issue where its laggy though
i mean yeah its gonna be inevitable due to ping differences in the client and server. no matter what there’s still gonna be a delay
Yes, but it gets laggier, and laggier, and laggier to the point where its impossible
can you record a video and send it
If you need the guaranteed behavior, it’s impossible. UnreliableRemotEvents will ignore any packets dropped. The client can also tamper with the sending of the data itself, making it unsecured.
Again, for experimentation purposes only, try rate limiting the remote on the client-side. You can also send packets as a payload instead of individual inputs.
-- psuedo code
local inputs = {}
while true do
if #inputs > 0 then
someRemoteEvent:FireServer(inputs)
table.clear(inputs)
end
task.wait(0.1)
end
This issue sounds completely unrelated to RemoteEvents themselves and you likely have a memory leak somewhere in your game that handles network events. Remotes shouldn’t cause much noticeable lag, but if they do, the issue almost certainly lies within your own implementation.
Yeh I do, but fixing it has been a bit annoying.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.