Why can I not use lookvector when using interpolation?
Asked by
4 years ago Edited 4 years ago
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local UIP = game:GetService("UserInputService")
UIP.InputBegan:Connect(function(Key)
if Key.KeyCode == Enum.KeyCode.E then
camera:Interpolate(player.Character.Head.CFrame, player.Character.Head.CFrame.LookVector ,1)
end
end)
workspace.Part.ClickDetector.MouseClick:Connect(function()
camera.CameraType = Enum.CameraType.Scriptable
camera:Interpolate(workspace.watcher.CFrame, workspace.Part.CFrame, 1)
end)
> ` 18:15:43.618 - Unable to cast Vector3 to CoordinateFrame
> 18:15:43.619 - Stack Begin
> 18:15:43.619 - Script 'Players.Thesquid13.PlayerGui.LocalScript', Line 8
> 18:15:43.620 - Stack End`