The script with error (error at near end part):
local plr = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local mainMenuMap = workspace:WaitForChild("MainMenuMap")
local tweenService = game:GetService("TweenService")
local btn = script.Parent
function tweenCamera(pos,tweenTime)
tweenService:Create(camera,TweenInfo.new(tweenTime,Enum.EasingStyle.Linear),{CFrame = pos.CFrame}):play()
end
btn.MouseButton1Click:Connect(function()
btn.Visible = false
btn.Parent.Title.Visible = false
btn.Parent.CreditButton.Visible = false
repeat wait()
camera.CameraType = Enum.CameraType.KeyboardMouse
until camera.CameraType == Enum.CameraType.KeyboardMouse
camera.CFrame = workspace.Camera.CFrame
end)

1 comment
I have the answer already!