Is there a reason why I cannot lerp terrain color?
Asked by
5 years ago Edited 5 years ago
I have typed out the code, this belongs in a local script inside of a part, when the player touches the part, the terrain color lerps to the part's color. Please explain in your answers if you can.
01 | local Terrain = workspace.Terrain |
02 | script.Parent.Touched:Connect( function (hit) |
03 | if hit.Parent = = game.Players:GetPlayerFromCharacter(hit.Parent).Character then |
06 | Terrain:SetMaterialColor( "CrackedLava" ,Terrain:GetMaterialColor( "CrackedLava" ):Lerp(script.Parent.Color)) |