gillern
(gillern)
November 6, 2018, 5:03am
#1
When you try to :PasteRegion() on the server, it works fine but when you try do it on the client it just doesn’t work at all.
TerrainBug.rbxl (13.9 KB)
There’s a script in ServerScriptService and a localscript in StarterPlayerScripts so you can see, the code is exactly the same but only the server one gets pasted in
sleitnick
(sleitnick)
November 6, 2018, 5:09am
#2
TerrainRegions don’t replicate by design, which is why it won’t work client-side. It’s documented on the PasteRegion page:
Arguably, this should be documented on the main page for the TerrainRegion object, not on one of its methods.
gillern
(gillern)
November 6, 2018, 5:18am
#3
Doesn’t that mean if i have a TerrainRegion in serverstorage and decide to parent it to workspace, then it wont replicate?
I thought that since it exists on the client from the beginning that it should be fine
sleitnick
(sleitnick)
November 6, 2018, 5:20am
#4
The object replicates, but the data within the object does not. Kinda weird. Check out @zeuxcg ’s response to this on my thread a few years ago:
The reason you can’t do this right now is because TerrainRegion contents is not replicated.
And the reason behind that is that the implementation is complicated, so we decided to skip that when implementing TerrainRegion.
Since you can put your entire terrain into TerrainRegion, we can’t implement replication of this object as we replicate other objects - or the client would be forced to synchronously receive a property worth hundreds of kilobytes of data.
To make this work, we’d have to impl…
2 Likes
gillern
(gillern)
November 6, 2018, 5:22am
#5
Dang, ig I’ll just keep the terrain fully loaded then split it up into regions on the client instead
1 Like
sleitnick
(sleitnick)
November 6, 2018, 5:22am
#6
Yeah I wish there was a better option
devSparkle
(devSparkle)
November 6, 2018, 12:15pm
#7
Hypothetically speaking, couldn’t you load the entire terrain on game start, and have the player locally segment it and clear it from view thereafter?
gillern
(gillern)
November 6, 2018, 7:56pm
#8
Yeah that’s exactly what I’m doing
1 Like