I’m trying to tween the camera to a part but i keep getting the error “Unable to cast value to Object”
local plr = game:GetService('Players').LocalPlayer
local camera = workspace.Camera
local Cams = workspace:WaitForChild('Cams')
local tweenService = game:GetService('TweenService')
script.Parent.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Scriptable
tweenService:Create(camera.CFrame, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {CFrame = Cams.Cam1.CFrame}):Play()
end)