Not sure if this is the right place to post this,but…
workspace.Terrain:ReplaceMaterial(Region3.new(Vector3.new(5000,5000,5000),Vector3.new(5000,5000,5000));,“LeafyGrass”,“Snow”)
is there anything wrong with this line?
Not sure if this is the right place to post this,but…
workspace.Terrain:ReplaceMaterial(Region3.new(Vector3.new(5000,5000,5000),Vector3.new(5000,5000,5000));,“LeafyGrass”,“Snow”)
is there anything wrong with this line?
This is the wrong category as you are seeking help for the code, move this to #help-and-feedback:scripting-support
Also, as you have mentioned, the code does not work. Please read: About the Code Review category
Why is there a semicolon? Try
workspace.Terrain:ReplaceMaterial(Region3.new(Vector3.new(5000,5000,5000),Vector3.new(5000,5000,5000)), Enum.Material.LeafyGrass, Enum.Material.Snow)
Region3’s are constructed by giving two opposite corner arguments. For instance, if you want to create a 2 cubic stud region relative to world 0,0,0 , you would say: Region3.new(Vector3.new(0,0,0),Vector3.new(2,2,2))
.
You are giving the same positional argument both times, creating a region of 0 cubic studs.
so,for a 5000x5000x5000 map it would be Region3.new(Vector3.new(-2500,-2500,-2500),Vector3.new(2500,2500,2500)). ?
still,nothing happens
Try: workspace.Terrain:ReplaceMaterial(Region3.new(Vector3.new(-2500,-2500,-2500),Vector3.new(2500,2500,2500)),4,Enum.Material.X, Enum.Material.Y)
X is the material you want to change, Y is the material you want to change to.