Hello I wanted to make a camera just like telltales the walking dead but I seem to be stuggling
local Player = game.Players.LocalPlayer
local Character = Player.Character
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local CameraPartOne = workspace.CameraPartOne
local CameraPartTwo = workspace.CameraPartTwo
local CameraPartThree = workspace.CameraPartThree
local CameraPartFour = workspace.CameraPartFour
local CameraPartFive = workspace.CameraPartFive
local CameraOne = workspace.CameraOne
local CameraTwo = workspace.CameraTwo
local CameraThree = workspace.CameraThree
local CameraFour = workspace.CameraFour
local CameraFive = workspace.CameraFive
camera.FieldOfView = 36
_G.ScenePlaying = false
game:GetService("RunService").RenderStepped:Connect(function()
if _G.ScenePlaying == false then
local touchingOne = CameraPartOne:GetTouchingParts()
local touchingTwo = CameraPartTwo:GetTouchingParts()
local touchingThree = CameraPartThree:GetTouchingParts()
local touchingFour = CameraPartFour:GetTouchingParts()
local touchingFive = CameraPartFive:GetTouchingParts()
for i=1,#touchingOne do
if touchingOne[i] == Character.HumanoidRootPart then
camera.CFrame = CameraOne.CFrame
end
end
for i=1,#touchingTwo do
if touchingTwo[i] == Character.HumanoidRootPart then
camera.CFrame = CameraTwo.CFrame
end
end
for i=1,#touchingThree do
if touchingThree[i] == Character.HumanoidRootPart then
camera.CFrame = CameraThree.CFrame
end
end
for i=1,#touchingFour do
if touchingFour[i] == Character.HumanoidRootPart then
camera.CFrame = CameraFour.CFrame
end
end
for i=1,#touchingFive do
if touchingFive[i] == Character.HumanoidRootPart then
camera.CFrame = CameraFive.CFrame
end
end
end
end)
That works pretty well except it doesn’t follow the character from a fixed angle I want it to do so butt I’ve struggled. I looked into CFrame Angles and all that stuff but it just doesn’t work.
Here’s how the camera is at the moment:
robloxapp-20210823-0309141.wmv (1.5 MB)
Any help will be appreciated!