So I made it so when you click a button it changes your camera to a camera part, but now I don’t know how to change it back to the player’s camera. Anyone know how to do this?
1 Like
Camera.CFrame = game.Players.LocalPlayer
Something like that
Set the CameraSubject to the player’s Humanoid object and set the CameraType to “Custom”
1 Like
All you need to do is set the CameraType back to Custom, set the CameraSubject to their Humanoid and the CFrame to their HumanoidRootPart’s CFrame * some offset.
For example:
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Character.Humanoid
Camera.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-3) --// Their position + -3 Z axis