Hi i want make this : part = game.Workspace.Part button = script.Parent button2 = game.StarterGui.ScreenGui.TextButton if button press then camera position = part position and if player click button2 then normal camera -Thank you and best regards ! -PPJASK
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)