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.