Help with changing terrain color with a Script?

There no script for change colour for terrain , if you want change colour terrain so :

  1. Go to Roblox Studio
  2. Click Workspace.
  3. Click Terrain
  4. Click MaterialColor ( then click “Click to expand” ) : Test 1 Test 2
    So can choose color you want for terrain !
5 Likes

you can change terrain but only the water by script.

Water can make with script or can change water on terrain !

is what i said but like if you want make a local script and make part that when player touch the part so is change the water so you can.

also i am think that there is a way to script terrain on roblox like grass beacuse i found game that doing that: 💰 x20 MONEY 💰 🍃 LAWN MOWING SIMULATOR ⚡ - Roblox

you can do that…

Well is mean water can’t recieve shadow of picture on water for example the picture here :


So this need update about water !

is can you just need to change the water settings…

1 Like

So where i can change water it ?

1 Like

here
image

and also make sure that the lighting is shadow-map (for give the shadow effect)

Well… i just got shadow !

1 Like

and thats what you want right? :thinking:

Yes that i want they about this !

if you on studio beta maybe you can make that even better the water effects :wink:

also if you using realistic trees:

About me , is just recieve shadow of tree ! i need shadow and picture on water !

change the graphics and you will get the image

There is a way to change and read terrain colours but it needs to be done with a function, you cannot directly write to it. SetMaterialColor will get the job done for you. Likewise, of course, it has a Get function as well so that you can tell what the current colour of a material is.

11 Likes

To add onto what @colbert2677 has said, it is definitely possible to read and write the colors of terrain.
To read you would use the function: Terrain:GetMaterialColor(material)
To write you would use the function: Terrain:SetMaterialColor(material, Color3)

Example code:

local Terrain = game:GetService("Workspace").Terrain

--Gets the material color of the terrain material in question
local GetColor = Terrain:GetMaterialColor(Enum.Material.Grass)

print(GetColor) --Outputs the color of the terrain material

--Sets the material color of the terrain material in question
local SetColor = Terrain:SetMaterialColor(Enum.Material.Grass, Color3.fromRGB(0,180,255))

Hope this helped!

(I withdrew my previous post to reply to OP :slight_smile: )

21 Likes