Question about working around latency for building system placement

The problem is that I’m using a RemoteEvent to place and this comes with noticable latency on higher ping, so I’m wondering what I can do to counteract this or I guess circumvent like just give the illusion that it was placed instantly?

3 Likes

use module script it is better than remote event and stronger than remote event bcus remote event easily get hacked by event manager exploit

2 Likes

dude the server and client both get seperate copies of info in a remote event, and in my case im talking about the client telling the server to place a building piece but there is noticable latency on higher ping, im just wondering if theres a way to circumvent that or even give the illusion that there is lower latency

To my knowledge, there is no work around. The ping of players cannot be controlled, and it is not possible to get around it since the client “talks” to the server, which ping has an effect on.

Yeah but surely there must be some ways to make the placement look like it was done instantly or give the illusion that it was?

More likely than not, it would be incredibly difficult. I would say not even worth the time, unfortunately.

Hm, couldn’t like maybe having the client place the building piece visuallly and then having the server do it?

That’s definitely a good and easy way for one player, but if you would want it to be for everyone, that is where it becomes very difficult.

dont you know module become client side if local script call them and become server sided if server script call it

Not sure how that would make a difference on what they said. It also makes the module become very vulnerable when it’s run by the client.

No so basically it wouldnt matter about making it too other players because it’s the player that is building it who will see it first, the firing of the remote event will handle the replication, just likke on your screen when your moving its reponsive and fast but on another clients screen your not moving in real time

Then yes, that would be the best way. Just remember to delete the visual one when it appears on the server. I’ve made the mistake of not doing that before :rofl:

1 Like

Okay so that’s what I’m confused about because let’s say I place it on the client visually and then fire the remote, like how exactly would I know how long until the server one is built to tell the client to delete the one they made?

You could use a remote event on the server to fire back to let the client know when to delete the visual block.

1 Like

Hm, okay i’m going to try this and I’ll report back to you thank you

1 Like

Client sends data → Server gets that data (their ping) milliseconds later.

In fact, when you play on any Roblox server, the players that are moving around on your screen are actually not there in real time, you see them where they used to be.

Usually what I do in these situations is I have a block that’s only visible to the client and a clone of the same block on the server that’s not visible to the same client but instead visible to every other client on the server. The client will move that block around and place it down normally so as to not feel latency, and while moving it around or / and after that block is placed down you fire the remote(s) to the server to update the server block position. So now other clients will see you move that block around (the server block) at the same time your client is moving around on their screen. The other clients won’t see any latency because it just looks normal.

Another thing you can do with non-anchored parts (anchored parts won’t work) is change the network ownership of the block on the server to the client, so you won’t have to do anything I mentioned above but I don’t recommend this because it’s going to be a lot more difficult to validate the position from exploiters.

If you do fire remote events constantly, remember that there’s a limit to how often you can fire it. It’s max 20 ticks per second, so I would consider animating the block between the positions to make it look smoother.

1 Like

Preview/pre-place the object on the client, then properly replicate the placement when the client receives a response from the server

You can create the building on the player who placed it client then fire the remote and the server fires a remote to all the other players to create the building.

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