I am new to roblox scripting, and I am working on a game. I am trying to make an exploration game with multiple planets. I want the colors on the surfaces of the planets to vary, but I also wish to use smooth terrain, as it is easier to use and looks nice. from reading a bit online, i have figured out i need to use "GetMaterialColor" or "SetMaterialColor". however, "SetMaterialColor", the one i needed specifically, requires two bits of information- the material and the color.
The issue comes from the "Material" part of this, as I have no idea how to make the script recognize what material I want to change. i tried multiple things, including but not limited to: (grass, #,#,#) (grass) (#,#,#) ("Grass"), (#,#,#) ("Grass", #,#,#) or even just (#,#,#), without trying to get a specific material at all
so yeah, I need some help
here is the code:
local function onTouch(hit)
game.Workspace.Terrain:SetMaterialColor
end
script.Parent.Touched:connect(onTouch)
(there should be stuff after SetMaterialColor, that is what i need help with)
game.Workspace.Terrain:SetMaterialColor(Enum.Material.Grass, Color3.new(0.596078, 0.760784, 0.858824))I am totally out of the specific color you need. Please checkout this discussion about using the Material devforum.roblox.com/t/… and docs on the Color developer.roblox.com/en-us/api-reference/datatype/Color3 - Pavlo Strokov