This script makes it so that when you click a button it shows you a different view via campart. When you click the X button it should return your camera, but it doesn't. Maybe I am just missing the right thing?
Script:
local xbutton = game.Players.LocalPlayer:FindFirstChild("PlayerGui").Exitcamera.X
local Players = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
xbutton.MouseButton1Click:Connect(function(player)
repeat wait() until Players.Character
camera.CameraType = "Scriptable"
camera.CFrame = workspace.Camera
game.Players.LocalPlayer:FindFirstChild("PlayerGui").Exitcamera.Enabled = false
game.Players.LocalPlayer:FindFirstChild("PlayerGui").Camera.Enabled = true
end)
