Hi, I have a script that manipulates the camera fine as is, but i was wondering if there was a way to make it look more fancy. I wan't the camera to tween to the players head, but I wan't it to stop when its directly facing the player. I wan't the camera to be at this position when the tween ends. https://gyazo.com/bc5df8d62ce4104497d83719b97ef5e1
Here's the code.
local Players = game:GetService("Players")
game.Workspace.TS.TSCamera.OnClientEvent:Connect(function(Length, Player, Bruh2)
if script.Done.Value == false then
script.Done.Value = true
local TweenService = game:GetService("TweenService")
local camera = game.Workspace.CurrentCamera --Variable for our camera
function tween(part1, part2, cutsceneTime)
local tweenInfo = TweenInfo.new(
cutsceneTime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
camera.CameraType = Enum.CameraType.Scriptable
local tween = TweenService:Create(camera, tweenInfo, {CFrame = Player.Character.Head.CFrame})
tween:Play()
wait(cutsceneTime)
camera.CameraType = Enum.CameraType.Custom
end
for n, Player2 in pairs(Players:GetPlayers()) do
print("PLAYER IS "..tostring(Player))
print("PLAYER2 IS "..tostring(Player2))
tween(Player2.Character, Player.Character, 2)
end
end
script.Done.Value = false
end)
Is there any way that this is possible?

1 comment
Yes, get the HMR LookVector, multiply it to offset, then flip the camera around to face the player