I wanted to tween the camera so it focus on the player, however, it does not happen what do I do script:
local cam = workspace.CurrentCamera local player = game.Players.LocalPlayer local button = script.Parent local TS = game:GetService("TweenService") local info = TweenInfo.new( 3, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0 ) button.MouseButton1Click:Connect(function() cam.CameraType = Enum.CameraType.Custom local Goals = {cam.CameraSubject = player:FindFirstChild("Humanoid")} local humanTween = TS:Create(cam, info, Goals) humanTween:Play() end)
You want to include only the name of the property, not the instance of which you want to tween in the goals. And I'm not sure if you can tween a property with an Instance value.
You will need to turn the CurrentCamera type to "Scriptable" before tweening it's position
You can do this by writing this line:
cam.CameraType = Enum.CameraType.Scriptable
Or you can write:
cam.CameraType = "Scriptable"
You would write one of these lines instead of "Custom"