Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Camera Manipulation not working?

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)

2 answers

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.