I have a part in workspace called"FocusHere" and when game starts the camera will focus and spin around the brick. I want to take out that brick and when a player joins, it will focus on the player.
So instead of a part, I want the player to be focused on.
player = game.Players.LocalPlayer cam = game.Workspace.CurrentCamera cam.CameraSubject = game.Workspace.FocusHere cam.CameraType = "Custom" loops = 0 angle = 0 position = 0 while loops <500 do cam.CoordinateFrame = game.Workspace.FocusHere.CFrame * CFrame.Angles(0,angle,angle) * CFrame.new(position, position, position) loops = loops + 1 angle = angle + math.rad(3) position = position + 1 wait() end cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Follow" script:Destroy()
These are my changes to make this work:
player = game.Players.LocalPlayer head = player.Character.Head cam = game.Workspace.CurrentCamera cam.CameraSubject = head --game.Workspace.FocusHere cam.CameraType = "Custom" loops = 0 angle = 0 position = 0 while loops <500 do cam.CoordinateFrame = cam.CameraSubject.CFrame * CFrame.Angles(0,angle,angle) * CFrame.new(position, position, position) loops = loops + 1 angle = angle + math.rad(3) position = position + 1 wait(.05) end cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid cam.CameraType = "Custom" script:Destroy()