Changing particle effect depending on smooth terrain?

While working on me and my friend’s game, I noticed that the particle effect for all smooth terrain is the same. The hit effect currently finds the color of the part that it hits and that is what the color value is set to, so shooting a red placed block yields red, etc. However, terrain, regardless of color set in the MaterialColors tab, does not have a color. Is there a way to have the particle effect’s color match the terrain that gets hit?


(Dirt is brown but yields the default grey, same with grass, stone, etc.

3 Likes

If you were to collect which terrain type it is, and in the terrain settings, get the color, You can mess with the effect. But I don’t know how to accomplish that though…

You can use Terrain:GetMaterialColor:

local grassColor3 = workspace.Terrain:GetMaterialColor(Enum.Material.Grass)

So as long as you get the material of the terrain at a certain spot, you can get the color using that method.

6 Likes