Im trying to tween my camera to a part but i keep getting this error -
** 00:21:45.615 Unable to cast to Dictionary - Client - cam:25**
This is my Code
cam = workspace.CurrentCamera
local Tween = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local char = player.Character
local touchPart = game.Workspace.touchPart
local camPart = game.Workspace.FocusPart
camPart2 = game.Workspace.FocusPart2
camType = Enum.CameraType.Scriptable
touchPart.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
local info = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
true,
1
)
local Goals = {
Focus = game.Workspace.FocusPart.CFrame
}
local start = Tween:Create(info, Goals, camType)
start:Play()
end
end)
Please help!!!

1 comment
Thank you very much for the answer