Making an egg hatching animation

How would i go about making an animation with an egg infront of the players camera like bubble gum simulator

I know that i need to use renderstepped to position it infront and that works perfectly, its just i dont know how i would actually make it drop down and shake. Ive tried to tween it but that didnt work

Bubble gum simulator:

1 Like

Its made with ViewPortFrames and Eggs are in View Port Frames they are tweening to center and making tween rotation


yeah thats what i thought at first before i saw this thread where one of the developers confirmed it was made by actual part infront of the camera, and viewport frames wouldnt allow effects and stuff like that

Are you using workspace.CurrentCamera:GetRenderCFrame()?

1 Like

no, could you explain how i could use that to help

That function will get the exact position of the users camera.

If you use some additional CFrames, you should be able to do something like:

    egg.CFrame = workspace.CurrentCamera:GetRenderCFrame() *,0,-3.5) 

It’ll position the egg (if you set the variable of egg to a mesh / part for the egg) infront of the camera, to the right.

We can use TweenService to make it move up and down with additional CFrames.
From what I know this second, your only option is to use a CFrameValue and multiply that by the Camera’s CFrame to get where you’d like to place it.

So, if we use something like that, your code should look something like:

local creature = workspace.Creature
local egg = workspace.Egg

local TS = game:GetService('TweenService')
local NCF ='CFrameValue')
NCF.Value =,10,-3.5) -- Make the egg higher than the camera can see

function hatchEgg()
	local tween = TS:Create(NCF,, {CFrame =,0,-3.5)}) -- Make a tween which would make the egg drop down
	tween.Completed:Connect(function() -- Let it complete before "hatching" the egg
		local hatchTween = TS:Create(egg,, {Size =,0,0)})
		local hatchTween2 = TS:Create(creature,, {Size =,1,1)}) Change the 1,1,1 to the Size of the creature to come out
			NCF.Value =,10,-3.5) -- Make the egg higher than the camera can see, again.
			egg.Size =,1,1) -- Change the 1,1,1 to the Size of the egg, so it'll revert meaning it can be used more than once

    egg.CFrame = workspace.CurrentCamera:GetRenderCFrame() * NCF.Value

[2023 EDIT]
This code is incredibly unoptimized and if possible you should ensure that your tweens (and generally common-used objects) are cached to prevent a memory leak.


where do you call the hatch egg function? (i am very late lol)

nevermind, i figured it out my self :slight_smile: