help, the code below doesn't work. the click detector is in the clickpart and the code below is in a local script
script.Parent.Parent.ClickPart.ClickDetector.MouseClick:Connect(function() local camera = game.Workspace.CurrentCamera camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = script.Parent.cam.CFrame end)
The entire LocalScript won't run because it's not a descendant of the player (given that you're referencing a part with script.Parent.Parent.ClickPart
). Move the LocalScript to StarterGui, StarterPack, etc, and access the part via game.Workspace.ClickPart
(assuming it's a direct child of workspace).
I suppose that you should use CFrame.new to make this work.