Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I don't know how to remove a part of an script to make it what i want it to do, help ?

Asked by 5 years ago
Edited 5 years ago

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)

0
Im sort of confused on what your looking for here? I would love to help. Pooglies 7 — 5y
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 Cioss_Team 14 — 5y
0
Did you try changing torso.Position.Y and torso.Position.Z dinozaver_triceratop 78 — 5y
0
witch ? Cioss_Team 14 — 5y

Answer this question