wait(1) local camera = workspace.CurrentCamera local part = script.Parent.Workspace.CamPart for _, player in pairs(game.Players:GetChildren()) do camera.CameraType = Enum.CameraType.Scriptable camera.CameraSubject = part print("Camera Work") end
I have try this script and it only print "Camera Work" but it not changing the camera
i just wanna know if there a way to use a script to change the camera for players
you get the CurrentCamera from workspace, in order to "put" camera somewhere, you need to give it a new location, position / cframe.
You can change the camera by change the camera CFrame.
wait(1) local camera = workspace.CurrentCamera camera.CFrame = workspace.CamPart.CFrame
If you want the camera to follow CamPart do this
wait(1) local camera = workspace.CurrentCamera local runService = game:GetService("RunService") runService.RenderStepped:Connect(function() camera.CFrame = workspace.CamPart.CFrame end)
Update camera on RenderStepped to get smooth motion.