Make particles grow by Size of a part, linearly and still around the egg?

Hey developers. I have an egg 3D hatching system, with a rare pet, that when hatched, has special particles on the egg. Only issue is that the egg grows in size while the particles are being shown, requiring the particles to grow linearly with the egg. How can I do this?

This is the egg (with Hatching Particles) and what it should be like:

This is the script That I have tried that I have failed with:

--Handles The growth part of my script
local NumberOfGrowth = 20
	repeat
		NumberOfGrowth -= 1
		local increment = (20 - NumberOfGrowth) 
		for i, parts:BasePart in Egg:GetChildren() do
			if parts:IsA("BasePart") then
				parts.Size = Vector3.new(parts.Size.X + 2, parts.Size.Y + 2.5, parts.Size.Z + 2) --Increase size of all parts in the egg
				parts.Position = Vector3.new(parts.Position.X, parts.Position.Y + 1, parts.Position.Z) -- Move the position up, as it grows, the bottom goes to the floor, so we increase position
			end
			
			if NumberOfGrowth <= 15 then -- No Particles until after the first 5 growth
				if Egg.ParticlesHandler:FindFirstChild("GlitchedNormalEffect") then
					Egg.ParticlesHandler:FindFirstChild("GlitchedNormalEffect").Size = NumberSequence.new(increment) -- Increase the Size, but this has failed
				else
--Adds them in for the first time
					local clone = game.ReplicatedStorage.Pets.EggGlitchedParticles:FindFirstChild("GlitchedNormalEffect"):Clone()
					clone.Parent = Egg.ParticlesHandler
					clone.Size = NumberSequence.new((20 - NumberOfGrowth) * 3)
				end
			end


--There is more particles, But Its the same thing, and can apply what I learn with others

Video of Failed attempt:

This is what I want that I don’t like:

Stars are too big, (and like the rate is too much, but I should be able to change that on my own)
There is suppose to be a ring around the egg? That has failed and instead, spawns in random places and not around the egg.
The glow also, like the ring, spawns in random places

I don’t work with particles too much and I’ve looked at many posts. Any help is much appreciated as I have worked on this for a couple days now. :slight_smile:

If you want particles to spawn in specific places, put them on attachments.

Your approach of changing the size through a scripts should work, it does for me.

local p = workspace.p.p p:Emit(20) p.Size = NumberSequence.new(20) task.wait(.5) p.Size = NumberSequence.new(1)

It starts at 20, and we remove 1 each loop. So we are decreasing.

I can tell it’s working. For me the main issue is scale. I want the particles to grow with the size of an object. A 1: 1 scale

I will try this right now!

Textures can have different sizes, I guess you’ll need an increment for each differently sized ParticleEmitter. I’d use a table and just check what numbers work the way I want the particle to look.

1 Like

I’m gonna mark your post as the solution, although what I used was Model:ScaleTo() which Scales the size of everything including particles. But thatnks for your help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.