What do you want to achieve?
I am trying to make a random rain system using dynamic clouds. When The Rain Starts to fall, I would like the dynamic clouds to turn into rain clouds (Density 1 and cover 1)
What is the issue?
Everything works properly except for the clouds. This is my first time trying to get the clouds to work through a script so I’m pretty lost right now
Sorry to be late but I’ve created a modified version of the script (by the way you were using a different symbol for a string format byte:226)
local clouds = Instance.new("Clouds")
local CloudColor=Color3.fromRGB(186, 186, 186)
local RainColor=Color3.fromRGB(57, 57, 57)
local SunColor=Color3.fromRGB(255, 255, 255)
local function TweenClouds(Cloud,Prop,Time)
return game.TweenService:Create(workspace.Terrain.Clouds,TweenInfo.new(Time,Enum.EasingStyle.Linear),Prop):Play()
end
local function SetRain()
local s=math.random(1,3)
local IsGonnaRain=s==3
local Sun=s==2
if IsGonnaRain then
TweenClouds(clouds,{Color=RainColor,Cover=0.891},10)
elseif Sun then
TweenClouds(clouds,{Color=CloudColor,Cover=0.7},10)
else
TweenClouds(clouds,{Color=CloudColor,Cover=0.7},10)
end
end
clouds.Enabled = true
clouds.Color = CloudColor
clouds.Cover = 0.7
clouds.Parent = game.Workspace.Terrain
SetRain()
spawn(function()
while wait(13) do
SetRain()
end
end)