Terrain Fails To Load With Paste Region On Live Services

Using terrain region and paste region to load in maps fails to load terrain occasionally. Its super frustrating because it kills our player count.

image
image
image
image

I’ve been using the same code for years.

		local regionFolder = game.ReplicatedStorage.Maps[GameStuff.MapName.Value].Map["Region Folder"]
		local regionCorners = require(game.ReplicatedStorage.Maps[GameStuff.MapName.Value].Map["Region Corners"])
		for i, corner in pairs(regionCorners) do
		    workspace.Terrain:PasteRegion(regionFolder[tostring(i)], corner, true)
		    wait(0.75)
		end

Here is an example of the regions folder and corners that I loop through on the server side every time a new map loads.

regions.rbxm (48.1 KB)

Expected behavior

I expect the terrain to load. It does not load.

2 Likes

Do you know approximately when this issue began? What experience is having this problem (I’m guessing Those Who Remain - Roblox based on your profile)?

2 Likes

The first bug report from our community regarding this issue was posted 26 days ago (03/29/2024).

Correct, the experience the problem is occurring in is Those Who Remain - Roblox

1 Like

Hi there! What are the specific place ids in your experience? Are there multiple? We need to know in order to disable some recent changes for your experience to see if that improves things. I see there are at least two:

488667523,
8287862132

1 Like

Yes, that is the correct experience. Place ID that uses that code is 8287862132. This issue happens at random times. The most recent bug report that that our players reported was around 2:30 am PST. Before that, it was on 3/29/2024 at around 3-4 pm PST. However, that was fixed with a server reset.

This time, it seems more persistent.

Edit: And the one before the 29th where it happened in spree was in December of 2018. There was a bug report on it then too.

Yes, 488667523 is the place id that uses the code I’ve posted in the OP. I’ve had tried some fixes since then, but the code still lies in ServerScriptService.Server.RoundSystem

Use task.wait(), normal wait() is deprecated

You can try doing Terrain:ReadVoxels and looping through materials materials[x][y][z].Name to check if everything is air, and if it is then retry pasting region

If it is any help, it seems to be the same plots the fail to load every time. However, on studio, the terrain loads perfectly fine.

Sorry, do both 8287862132 and 488667523 use the code then? Are there other place ids that also use this code in this experience?

Under this experience, 8287862132 is the place that uses the code. The code lies in ServerScriptService.Server.RoundSystem at line 616.

Ok, thank you! We staff don’t actually have access to placefiles, hence the clarifying questions :slight_smile:

No worries. Our community is still reporting this as an issue so a quick resolution will be highly appreciated.

Hey there - sorry for the delay! I spoke with the team, and we found a change that we think is causing these problems. I’ve reverted it for your experience and all of its place ids, but the reversion requires a Server restart to apply, so it may take a while for it to reach all of your players.

Please let me know if things improve or if the issue persists, and we can continue investigating.

Hey @nin900500! As communicated in the above reply, a change specific to terrain was reverted for your place.

Just to add to this reply, if this resolves the issue you were seeing could you please provide a place file with a minimal reproduction of the issues related to PasteRegion?

You should be able to test the live production behavior in a (private) place with an ID different from the ones used in your game.

After you’ve reproduced the issue, could you please share the place file over a DM with me? Thanks!

I am currently experiencing this… For some reason in studio testing, it works fine but when playing the actual game from roblox servers this happens…

3 Likes

Hi @ValonAedrovulf. I’d like to look into the issue you’re seeing. But, there’s not enough information in your original post to help us narrow down the problem.

Could you please provide a place file with a minimal reproduction of the issues related to PasteRegion? You can DM it to me.

1 Like

We have identified the issue that was causing this behavior. We will ship a fix in the next release. In the meantime we’ll keep the flag disabled for your place @nin900500.

You can also work around this by setting pasteEmptyCells to false. @ValonAedrovulf you should be able to use this for your use-case as a temporary workaround.

1 Like

I see, this workaround worked great! Thank you very much!

1 Like

There are still certain deformities in the loaded terrain with this workaround, specifically around water from my experience. I was wondering if you’re aware of this already and if it’s going to be fixed whenever the next release is.

I am noticing terrain pasteregion taking a lot longer than normal, so much so that it’s slowing down other game systems while it loads. It previously never took this long to load and we made no changes to our terrain loading system.