Luftalagi
(peonmaster4)
March 26, 2023, 5:10pm
#1
Hi, I’m trying to make a death camera that looks down at the player and moves upwards.
I’m having difficulty tweening the camera upwards without affecting the orientation.
game.ReplicatedStorage.DeathEvent.OnClientEvent:Connect(function(character)
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local offsetcframe = character.Head.CFrame*CFrame.new(0,5,0)
CurrentCamera.CFrame = CFrame.lookAt(offsetcframe.Position, Vector3.new(-90,-180,0), Vector3.new(0,5,0))
TweenService:Create(CurrentCamera, TweenInfo.new(game.Players.RespawnTime+1), {CFrame = character.Head.CFrame * CFrame.new(0,15,0)}):Play()
end)
CZXPEK
(czo)
March 26, 2023, 5:13pm
#2
You can make a CFrame without the Orientation values by doing this
CFrame.new(character.Head.Position)
Luftalagi
(peonmaster4)
March 26, 2023, 5:16pm
#3
i think the issue is with the second cframe value though. it moves to 0,15,0 just the orientation messes up.
your solution also gives a CFrame expected, got vector3
CZXPEK
(czo)
March 26, 2023, 5:18pm
#4
Maybe try something like this.
CFrame = character.Head.CFrame + Vector3.new(0, 15, 0)
Luftalagi
(peonmaster4)
March 26, 2023, 5:20pm
#5
“attempt to perform arithmetic (mul) on Instance and Vector3”.
I’m not sure you can add those together.
Luftalagi
(peonmaster4)
March 26, 2023, 6:06pm
#6
goal.CFrame = CFrame.new(humanoidRootPart.Position + Vector3.new(0, 5, -10))
solution for anyone else!
system
(system)
Closed
April 9, 2023, 6:07pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.