Clouds from Pet Sim 2 - how to create?

Hi!

Many of you have played Pet Simulator 2.
PetSimx

I really like the clouds, how they move slowly, etc.

I would like to create the same, wouldn’t you?
And I will tell you how to make them.

  1. Go to RS and add a part and press CTRL + G.

  2. After that, rename our model to “clouds”.
    2

  3. We add a script to the model and paste it:

local Cloud = script.Parent:WaitForChild("Cloud")

local density = 25

local spawnrate = 2

for i= 0, density do

newcloud = Cloud:clone()

newcloud.Parent = script.Parent

newcloud.Transparency = 0

newcloud.Script.Disabled = false

wait(spawnrate)

end

3
Let’s make part white and transparency to 1.
4. After that, rename our party to “Cloud” and create a script in it (the script should be disabled, shown in the screenshots).
4

5

6

7

  1. Then insert this code into the script:
local Cloud = script.Parent

while true do
	local timer = 60
	local speed = math.random(5, 30)/100

	local xS = math.random(40, 100)
	local yS = math.random(3, 10)
	local zS = math.random(40, 100)

	local xP = math.random(-200, 200)
	local yP = math.random(65, 85)
	local zP = math.random(-200, 0)

	local startpos = CFrame.new(xP, yP, zP)
	local startscale = Vector3.new(xS, yS, zS)

	Cloud.CFrame = startpos

	Cloud.Size = Vector3.new(0, 0, 0)

	local scaleaverage = (xS + yS + zS)/3

	for i= 0, scaleaverage do
		Cloud.Size = Vector3.new(Cloud.Size.X + xS/scaleaverage, Cloud.Size.Y + yS/scaleaverage, Cloud.Size.Z + zS/scaleaverage)
		wait()
	end
	for i= 0, timer*30 do
		Cloud.CFrame = Cloud.CFrame * CFrame.new(0, 0 , speed)
		wait()
	end
end

And everything is ready!
robloxapp-20220204-1618498.wmv (427.3 KB)

Topic created by this video - - YouTube
:+1:

7 Likes

TOP 10 MOST EASY THINGS TO CREATE (although my method will be different)

my only problem with this method is performance

anyway its pretty good

4 Likes

that’s a bit harsh but alright

1 Like

Nice, you should use random instead of just math.random. You have way more customization with random(like literally getting a random vector 3)

2 Likes

Or, you could just use the clouds that ROBLOX provide now, they have volumetric clouds you can add into your games, not talking about a skybox. Actual realistic moving clouds.

1 Like