Hi!
So basically, I was wondering how I would be able to use :destroy() on the camera, and then make a new one (locally) once the player's humanoid health is at 0.
Any help?
This is a LocalScript:
local button = script.Parent
local cam = game.Workspace.CurrentCamera
shared.camRotate = false
button.MouseButton1Down:Connect(function()
wait(4.5)
cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
cam.CameraType = "Custom"
shared.camRotate = true
game.StarterGui.LocalScript:Destroy()
game.Workspace.CamPart:Destroy()
end)
if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
cam:Destroy()
wait(6)
local x = Instance.new("Camera")
x.Name = "CurrentCamera"
x.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
x.CameraType = "Custom"
end
Heres the script which adjusts the camera on spawn:
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CamPart.CFrame
script.Parent.Enabled = true
Is there any way to reset the camera to default after a player clicks a button or with wait()?

3 comments
May I ask why you want to make a new Camera? Resetting the Camera to default is more convenient.
And if you delete a Camera, a new one is automatically created. So you don't have to do this yourself.
I am trying to make a new camera once I delete it because it switches to Scriptable once you reset due to the LocalScript which switches it to Scriptable even if you use :destroy()