Hi, I am making a menu and when the player clicks play, I want it to tween the camera to the player.
Right now, I have it so that the camera is set to a part when the player joins.
The error I’m having is TweenService:Create property named 'CameraSubject' cannot be tweened due to type mismatch (property is a 'Object', but given type is 'Instance')
How do I fix this?
local ts = game:GetService("TweenService")
local blur = game.lighting:WaitForChild("MenuBlur")
script.Parent.MouseButton1Click:Connect(function()
local ti = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local tween = ts:Create(blur, ti, {Size = 0})
tween:Play()
local camtween = ts:Create(workspace.CurrentCamera, ti, {CameraSubject = game.Players.LocalPlayer.Character.Humanoid})
camtween:Play()
script.Parent.Parent.Enabled = false
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)
Thanks!
btw, this is a local script