Resetting Camera to normal

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to make the players camera float above the map, then their camera will then return to normal after they press play (simulated by the wait(5))

  1. What is the issue? Include screenshots / videos if possible!

The script below sets the camera into a good position but I just cant seem to return the camera to normal (the 2nd part after the wait 5 is my attempt at resetting the camera to normal )



The before and after refer to the first part of the script(before the wait5) and after referes to after the wait 5 (2nd part of the script)

Excuse the bad handwriting I used my mouse.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried looking for people with similar issues but just come across old posts with irrelevant topics.
Ive tried to killing the character in an attempt to reload the camera, etc, etc.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

This is a local script located in starter player

UI in screenshots is disabled to better see the camera

local camera = workspace.CurrentCamera
print(camera.CFrame)
local plr = game.Players.LocalPlayer
local runservice = game:GetService("RunService")
local subject = workspace:WaitForChild("CameraPos")
local cframe = CFrame.new(subject.Position, subject.Orientation)
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = game.Workspace.CameraPos
camera.CFrame = cframe


wait(5)

camera.CFrame = CFrame.new( 0, 0.390434444, -4.51195717, 1, 0, -0, -0, 0.780868828, 0.624695063, 0, -0.624695063, 0.780868828) 
-- im trying to reset the cfame of the camera back to normal
camera.CameraSubject = plr.Character.Humanoid
print(plr.Character.Humanoid)
camera.CameraType = Enum.CameraType.Fixed

The default camera type is Enum.CameraType.Custom so instead of Fixed in the last line you should use Custom and that automatically returns it back to the player.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.