Ello! So I’m scripting this cutscene/play main menu and I want the camera to go back to the player whenever he clicks play but it clearly isn’t working any fixes?
local Frame = script.Parent.Parent
local PlayButton = script.Parent
local Camera = game.Workspace.CurrentCamera
local TweenService = game:GetService(“TweenService”)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = game.Workspace.Cam1
Camera.CFrame = game.Workspace.Cam1.CFrame
local Place = game.Workspace.Cam2
local player = game.Players.LocalPlayer
local Info = TweenInfo.new(
20,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
false,
0
)
local CamTween = TweenService:Create(Camera, Info, {CFrame = Place.CFrame})
CamTween:Play()
PlayButton.MouseButton1Click:Connect(function(click)
Frame:TweenPosition(
UDim2.new(0.223, 0, -0.9, 0),
“In”,
“Back”,
1,
true,
nil
)
local PopSound = script.Parent.PopSound
PopSound.Playing = true
wait(1)
print(“It’s working so far”)
wait(1)
Camera.CameraType = Enum.CameraType.Custom
local Character = player.Character or player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild(“Humanoid”)
Camera.CameraSubject = Humanoid
end)