Hello all, I am attempting to create this laser system that is able to erode terrain. For it to be satisfactory to the player, I am eroding terrain both in the server and in the client. This, however, is causing this weird behavior where the terrain “rolls back” to how it was beforehand. Performing this on just the client or the server does not show this behavior.
I assume the server sends it back to the client and that’s the issue, cause you’re sending a signal to client and server when the system already does that
But I assume that’s known cause replication. I’m not sure how you’d fix it or stop Roblox from auto sending back to client from server, or than just only sending to server
Maybe network ownership but I don’t think you can do that with terrain. Throwing out thoughts more than anything
I assume that is the cause, as well. One thing I noticed is that despite doing this a lot of times with other features in my project, this one seems to be offering the most problems, perhaps because of frequency? If I, say, create erosion every 1 second with this method, this behavior no longer exists.
Could send it to the server, and on the server, send the changes to all clients but yourself. This way you’ll still see what you’re doing without the rollbacks, and the other players will see it too.
you should base the erode system all on client, then the server receives the change afterwards - both recent replies in your post could be the reason why [event response].
Unless you want it real time updated, i would do prints each time its eroded and see the output, if its firing twice then the receiving end could give the answer
If there was a way to disable replication of parts I would, but eroding terrain on the server is automatically replicated to all clients. Is there a way?
delete cell on client, mark as deleted. while loop (max time length of 1) on client, checking if theres terrain in that cell the client marked as deleted. if there is, re-delete
I’m talking about eroding it on your client, and on other clients, not on the server.
You do this:
One client erodes, sends to server → Sanity check + verification, send to all clients except for firing player → Erode that piece of terrain for the rest of the clients as well.
I did this for my projectile module in my gun system, worked wonders so you can try it here.
Edit: Piggybacking on what @Ilucere said, you can also do this exact same thing with this method, on the server and send the deleted cells to the client that joined