Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing the color of Terrain Water, and making it change during night and day. ?

Asked by 6 years ago

Okay, so I'm new to scripting (I've been playing around with it though.) I've been watching the **old** roblox tutorials on how to script, there is this one I watched for making a street light that turns on in the day, and one for night time, so I thought: "Maybe I can make the water color change blue during the day, and red, during the night!

So I've tried many things such as:


game.WorkSpace.Terrain.Properties.WaterColor = (0,0,0) --or Game.WorkSpace.Terrain.WaterColor = (0,0,0) --And even Game.WorkSpace.Terrain = WaterColor(0,0,0) --Last one Game.WorkSpace.Terrain.Watercolor = Color3(0,0,0)

I forgot the digits I've used, I even used the color codes (#ff000 for example) I just want to change the color in the script, not physically in the game, so it can change colors during the time. Please help!!!

1 answer

Log in to vote
0
Answered by
Mayk728 855 Moderation Voter
6 years ago
Edited 6 years ago

You've made many mistakes here; game should always be lower case, W in Workspace should be capitalized only, and W & C in WaterColor should be capitalized. To set the color, use Color3.fromRGB(1,2,3)

game.Workspace.Terrain.WaterColor = Color3.fromRGB(0,0,255)

It's better to use "Color3.fromRGB" than "Color3.new", as you get RGB colors.

Here's an example of what the numbers represent: "Color3.fromRGB(RED,GREEN,BLUE)"

So, setting the last value to "255" and leaving the others on 0 makes it blue.

Now obviously, this blue won't look like a natural water color so you'll have to keep playing with the values until you get the right tone.

0
you could just change the color in terrain settings lol KronxGoat 50 — 4y
Ad

Answer this question