Hi!
Many of you have played Pet Simulator 2.
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.
-
Go to RS and add a part and press CTRL + G.
-
After that, rename our model to “clouds”.
-
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
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).
- 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