Can't set camerasubject to nil

I made a intro system. When someone joins the game, it sets the cameratype to scriptable and sets the camerasubject to a object, but i made a play button to play game and coded that script:

local pb = script.Parent  -- play button
local cc = workspace.CurrentCamera

pb.MouseButton1Click:Connect(function()
	cc.CameraType= Enum.CameraType.Custom
	cc.CameraSubject = nil
end)

it sets cameratype to custom when button is clicked. But its not setting camerasubject to nil. And when i join game and click play button, i can just control the camera, but its looks up to object which is i set camerasubject to this object.

(sorry for my poor english ;/)

I may be wrong but do you even need to set the camera subject to nill? If you want it to return the player you should be able to just make the camera type to custom if I am not mistaken.

i set cameratype to custom and it works, it sets when i click button. But its not sets camerasubject to nil. Because when i dont set it to nil, my camera just looks up to object and i just control it.

So if you want to reset the camera, why can’t you just set the CameraType to custom?

camera.CameraSubject = character.Humanoid
camera.CameraType = Enum.CameraType.Custom
camera.CFrame = character.Head.CFrame

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.