pwnion
|
  |
| Joined: 03 Jan 2017 |
| Total Posts: 117 |
|
|
| 18 Aug 2017 07:14 PM |
The CFrame positioning is fine, but the character is behind the camera. My map is designed a certain way so I can't just change the CFrame position to make it 20 studs behind the character. Instead I want to rotate the camera 180 degrees. Is there an easy way to do that?
Here's my script:
local player = game.Players.LocalPlayer repeat wait() until player.Character local char = player.Character local hrp = char:FindFirstChild("HumanoidRootPart") local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable cam.CameraSubject = hrp
local rs = game:GetService('RunService')
rs.RenderStepped:connect(function() cam.CFrame = CFrame.new(hrp.CFrame.X, hrp.CFrame.Y + 2, hrp.CFrame.Z - 20) end)
|
|
|
| Report Abuse |
|
|
| 18 Aug 2017 07:15 PM |
| *CFrame.Angles(0,math.pi,0) |
|
|
| Report Abuse |
|
pwnion
|
  |
| Joined: 03 Jan 2017 |
| Total Posts: 117 |
|
| |