--All scripts made by BM local TweenService = game:GetService("TweenService") local player = game:GetService("Players").LocalPlayer flag = true local cam = game.Workspace.Camera local cutsceneTime = 8 local tweenInfo = TweenInfo.new( cutsceneTime, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0 ) function tween(part1, part2) while flag do wait(.1) cam.CameraType = Enum.CameraType.Scriptable cam.CFrame = part1.CFrame local tween = TweenService:Create(cam, tweenInfo, {CFrame = part2.CFrame}) tween:Pause() script.Parent.MouseButton1Click:Connect(function() tween:Play() flag = false end) end end wait(.1) --Wait til player presses play tween(workspace.cam1, workspace.cam2) if flag == false then camToPlayer() end function camToPlayer() wait(cutsceneTime) cam.CameraType = Enum.CameraType.Scriptable player.CameraMode = Enum.CameraMode.Classic --This part doesn't work idk why end
-I tried different variations such as cam.CameraType = Enum.CameraType.Custom in the function camToPlayer and it just won't reset to player cam control after camera tweening it just stays stationary in my workspace.cam2. Help?
The easiest way to reset the camera is:
camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = humanoid -- path to the player's character's humanoid
Try changing your script:
-- lines ~23 tween:Play() tween.Completed:Wait() flag = false