I was just wondering if there is a way for me to change the 2 using a function like sine, I did think of just using a for loop and updating a variable, but I don’t know if that’s the best way
This won’t work since DeltaTime is the time in between each frame, so it will give a different number for different clients, and will also be a very small number(1/FPS)
local ts = game:GetService("TweenService")
local conc
local tweenInfo = TweenInfo.new(
3, --tween time
Enum.EasingStyle.Sine --easing
)
local goal = {}
goal.CFrame = Camera.CFrame * CFrame.new(0,0,(-Egg.PrimaryPart.Size.Z * 5))*CFrame.Angles(0,0,math.sin((tick() - StartTime)*10)/1.5)
local function TweenEgg()
local tween = ts:Create(Egg,tweenInfo,goal)
tween:Play()
end)