Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to reset back camera position?

I changed the player's camera CFrame so the player can see the whole map, but after a few seconds i want it to change back to its "original" CFrame.

I figured out its "original" CFrame by getting the cam position when i'm in test mode but now the camera is stuck on that CFrame and won't move.

local cam = workspace.CurrentCamera

cam.CFrame = CFrame.new(10,50,75)
wait(3)
cam.CFrame = CFrame. new(-39.986, 15.408, 10.988)

4 comments

0

P.S i got the cam CFrame by checking the character's head CFrame

0

post the code

0

done

0

Is this in a local script or regular script?

1 answer

This must be in a Local Script:

local cam = (workspace.CurrentCamera);
local char = (workspace:FindFirstChild(game.Players.LocalPlayer.Name));

cam.CFrame = CFrame.new(10,50,75);
wait(3);
cam.CameraSubject = (char:FindFirstChild("Humanoid"));
cam.CameraType = Enum.CameraType.Custom;

wait();
script:Destroy();

2 comments

0

sorry for the late reply, but it didn't work for some reason. i added a line under line 4 with print("camera moved"). to make sure. camera moved appeared on output but the camera didn't move even when i didn't test it on solo mode

0

Did you place the script in StarterGui or StarterPack?

This discussion is preserved as it was. New answers, comments, and votes are closed.