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

How to make camera position change ?

3 answers

Use camera manipulation

local cam = game.Workspace.CurrentCamera -- gets current camera
local part = game.Workspace.Part -- your part
local player = game.Players.LocalPlayer -- player
button.MouseButton1Click:Connect(function() -- on click
	cam.CameraType = Enum.CameraType.Scriptable -- makes camera abide by script
	cam.CFrame = part.CFrame -- Cframe is rotation and position
end)
button2.MouseButton1Click:Connect(function() -- on click
	cam.CameraType = Enum.CameraType.Custom -- custom camera (player choice)
	cam.CFrame = workspace[player.Name]:WaitForChild("HumanoidRootPart").CFrame -- player's humanoidrootpart cframe
end)

Here's a more optimized version of Omq_ItzJasmin's code (Remember to put it in a LocalScript):

local camera = workspace.CurrentCamera

local pos = Vector3.new(1,1,1)

camera.CFrame = CFrame.new(pos)

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