How can I make the animation not go back to it’s last positio? like not go back to normal.
local RunService = game:GetService('RunService')
local cameraOffset = CFrame.new(0, 0, -4.5) * CFrame.Angles(0, math.rad(180), 0)
local Egg = game.ReplicatedStorage.Egg:Clone() --or wherever else you put it
local pos = Instance.new("CFrameValue")
Egg.Parent = workspace
newOffset = cameraOffset + Vector3.new(-0.25, 0, 0)
RunService.RenderStepped:Connect(function()
Egg:SetPrimaryPartCFrame(workspace.Camera.CFrame * newOffset * pos.Value) -- you NEED to have the model with the RootPart as the PrimaryPart
end)
local TweenService = game:GetService("TweenService")
wait(5)
local goal = {}
goal.CFrame = Egg.Egg.CFrame * CFrame.fromOrientation(0, 0, math.random(-1,1))
local tweenInfo = TweenInfo.new(0.35)
local tween = TweenService:Create(Egg.Egg, tweenInfo, goal)
tween:Play()