Script is supposed to change WaterWaveSize

I made a script witch is supposed to change the size of waves. What is wrong with it?
Also some things about the script:
Its not a localscript
Its parent is ServerScriptService.
This is the script:

local Weather = game.Workspace.Terrain
while true do
wait(1)
Weather.WaterWaveSize = Random()
end

Found it! No worries! Do not reply as it is solved. Only reply if you have a more efficient way to make it work…

It’s true but you forgot the space.

local Weather = game.Workspace.Terrain

while true do
      Weather.WaterWaveSize = Random()
end

Um that would cause a script time out issue.

Oh I had it as Weather.WaterWaveSpeed = math.Random()
Thats how i fixed it