So i got a scrpt right here :

local camera = game.Workspace.CurrentCamera

local player = game.Players.LocalPlayer

camera.CameraType = Enum.CameraType.Scriptable

local targetDistance = 15

local cameraDistance = -15

local cameraDirection = Vector3.new(-1,0,0)

local currentTarget = cameraDirection*targetDistance

local currentPosition = cameraDirection*cameraDistance

game:GetService("RunService").RenderStepped:connect(function()

local character = player.Character

if character and character:FindFirstChild("Humanoid") and character:FindFirstChild("HumanoidRootPart") then

local torso = character.HumanoidRootPart

camera.Focus = torso.CFrame

if torso:FindFirstChild("FastStart") == nil then

camera.CoordinateFrame = CFrame.new(Vector3.new(torso.Position.X, torso.Position.Y + 10, torso.Position.Z - 20) + currentPosition,

Vector3.new(torso.Position.X, torso.Position.Y, torso.Position.Z - 20) + currentTarget)

else

--Lower camera for fast start

camera.CoordinateFrame = CFrame.new(Vector3.new(torso.Position.X, torso.Position.Y - 15, torso.Position.Z - 20) + currentPosition,

Vector3.new(torso.Position.X, torso.Position.Y - 15, torso.Position.Z - 20) + currentTarget)

end

end

end)

i'm trying to remove a part of the script that makes the camera not center properly on the player but i cant find out a way to do it

(it is the same script as infinite runner)

4 comments

0

Im sort of confused on what your looking for here? I would love to help.

0

i'm trying to remove a part of the script that makes the camera not center properly on the player but i cant find out a way

0

Did you try changing torso.Position.Y and torso.Position.Z

0

witch ?