I made a code that changes the camera subject, but now i'm trying to make a button that switches it back to the player camera i tried for a while now but it dosen't work.
code:
local Camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
script.Parent.TextButton.Activated:Connect(function()
Camera.CameraSubject = player.Character.Humanoid
end)
Place this as a LocalScript in StarterGui:
local Camera = workspace.CurrentCamera local player = game.Players.LocalPlayer script.Parent.TextButton.Activated:Connect(function() Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = Enum.CameraType.Custom end)
It may work.