I tweened the camera to a part in my game and it’s rotated the camera weirdly, so now instead of looking straight down to the part like its supposed to, its looking at the part from the side?
code: (local script in starter character scripts)
local camera = game.Workspace.CurrentCamera
local event = game.ReplicatedStorage.Events.SpiritBoardCamera
local TweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local cutsceneModel = game.Workspace:WaitForChild("SpiritBoardCutscene")
event.OnClientEvent:Connect(function(board, camPart, pointer, boardPos, camPos, pointerPos, num)
camera.CameraType = Enum.CameraType.Scriptable
local tweeninfo = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local cutsceneBoardPos = cutsceneModel.Board.Position
local cutsceneCamPos = cutsceneModel.Board.cameraPart.Position
local cutscenePointerPos = cutsceneModel.Pointer.MeshPart.Position
camera.CameraSubject = player.Character.Head
TweenService:Create(camera, tweeninfo, {CFrame = CFrame.new(game.Workspace:WaitForChild(player.Name.."SpiritBoard").Board.cameraPart.Position, game.Workspace:WaitForChild(player.Name.."SpiritBoard").Board.Position)}):Play()
if (num == 1) then
print("ghost not summoned")
else
print("summoned ghost")
TweenService:Create(camera, tweeninfo, {CFrame = CFrame.new(game.Workspace:WaitForChild(player.Name.."SpiritBoard").Board.cameraPart.Position, game.Workspace:WaitForChild(player.Name.."SpiritBoard").Board.Position)}):Play()
task.wait(0.75)
TweenService:Create(game.Lighting.SpellColour, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {TintColor = Color3.fromRGB(0,0,0)}):Play()
task.wait(1.2)
TweenService:Create(camera, tweeninfo, {CFrame = CFrame.new(cutsceneCamPos, cutsceneBoardPos)}):Play()
wait(1.95)
TweenService:Create(game.Lighting.SpellColour, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {TintColor = Color3.fromRGB(255,255,255)}):Play()
print("starting pointer movement")
end
camera.CameraSubject = player.Character.Humanoid
camera.CameraType = Enum.CameraType.Custom
end)
screenshots:
what its supposed to look like:
what it actually looks like: