Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with changing Terrain WaterColor to a random color?

The water is not changing Colors, I get Workspace.Script:5: attempt to index local 'Terrain' (a nil value) as an error

local Terrain = game:GetService('Terrain')

while wait(.5) do
--Terrain.WaterColor = Color3.fromRGB()
Terrain.WaterColor = Color3.new(math.random(), math.random(), math.random())
end

1 answer

✓ Accepted answer

Terrain isn't a service

To access terrain, use workspace.Terrain

local Terrain = workspace.Terrain

while wait(.5) do
--Terrain.WaterColor = Color3.fromRGB()
Terrain.WaterColor = Color3.new(math.random(), math.random(), math.random())
end
I did test this and it works like a charm

Good Luck!

If I helped, please don't forget to accept my answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.