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

How to allow walking backwards in third person?

Asked by 6 years ago

I'm making a third person game, but the problem is, when you press 'S' your camera turns. Is there any way to make it walk backwards? Here's my script if that helps:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local camera = workspace.CurrentCamera

local MAX_ZOOM_DIST = 30    
local MIN_ZOOM_DIST = 3

camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = char.HumanoidRootPart

game:GetService("RunService").RenderStepped:Connect(function()
    plr.CameraMaxZoomDistance = MAX_ZOOM_DIST
    plr.CameraMinZoomDistance = MIN_ZOOM_DIST

    camera.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(3, 5, 6) * CFrame.Angles(-.30, 0, 0)
end)
0
mark. ReyLaFreeze 26 — 6y

Answer this question