Help with Terrain scripting

Hello!

I’m trying to use Terrain:ReplaceMaterial() to change the material of my map for a certain game mode, but I keep getting this error:
image

Is there a max limit on Region3s? If so, what is it?

I’ve also used Region3:ExpandToGrid() and set the resolution for the replace function to 4.

My only other thought is that I’m using ExpandToGrid() wrong.

Also, here’s my region3
local playAreaTerrain = Region3.new(Vector3.new(-197.43, 234.858, -198.102),Vector3.new(199.046, 20.206, 197.468))

Oh wait, nevermind.
I mixed up my minimum and maximum values.
Oops.