Hey everyone! I’m trying to move the player camera down when he lands, and I kinda of achieved it by following this script:
local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
tween_ser = game:GetService("TweenService")
function MagicBubble(offset)
local To = tween_ser:Create(humanoid,TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.In),{CameraOffset = humanoid.CameraOffset - Vector3.new(0,offset,0)})
local From = tween_ser:Create(humanoid,TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{CameraOffset = humanoid.CameraOffset})
To:Play()
wait(.2)
From:Play()
From.Completed:Wait()
end
humanoid.StateChanged:Connect(function(old,new)
if new == Enum.HumanoidStateType.Landed then
MagicBubble(1)
end
end)
While it works, it looks kinda bad, because if you take a closer look the CameraOffset tween is being played after the character lands
I tried playing around with easing styles, but the main problem still is this:
CameraOffset tween is being played after the character lands
Thank you in advance!