i made this script for a camera system that sets you camera to a part when you press a button but if the person is using the camera then resets there character it brakes please can some one help fix this
here is the script
local myCamera = workspace.CurrentCamera – Reference users camera object
local cameraPart = workspace.UniverseLightingCameraSystem.CameraPart
script.Parent.MouseButton1Down:Connect(function()
if script.Parent.Value.Value == 0 then
myCamera.CameraType = Enum.CameraType.Scriptable