so I’m making a game and I want player move forward automatic and can’t move the camera angle so I make player move forward automatic but Idk how to make it can’t move the camera angle so please help me and ty
Because no one helped me I found an other method to make player can’t move the camera angle but that’s not what I want but its ok so i make the camera type (attach) so player can move it up and down only so that’s I know you all didn’t understand but sorry English is not my main language
You can put this in a Local Script under StarterCharacterScripts and it should work
local Camera = workspace.Camera -- Define Camera
Camera.CameraType = Enum.CameraType.Scriptable -- Set Camera Mode
Camera.CFrame = CFrame.new(Vector3.new(0,0,0)) -- Set Initial CFrame
local n = 20 -- Set Distance From Player
game:GetService("RunService").RenderStepped:Connect(function() -- Fire Every Time Camera Renders
Camera.CFrame = CFrame.new(script.Parent.HumanoidRootPart.Position,script.Parent.HumanoidRootPart.Position+Camera.CFrame.LookVector) + Camera.CFrame.LookVector * -n -- Move cf forward n units
end)
All you should have to do now is change h and n to your liking
local Camera = workspace.Camera -- Define Camera
Camera.CameraType = Enum.CameraType.Scriptable -- Set Camera Mode
local BaseCF = CFrame.new(Vector3.new(0,0,0)) -- Main CFrame
Camera.CFrame = BaseCF-- Set Initial CFrame
local n = 20 -- Set Distance From Player
local h = 20 -- Set Height Offset
game:GetService("RunService").RenderStepped:Connect(function() -- Fire Every Time Camera Renders
local CO = BaseCF.LookVector * -n + BaseCF.UpVector * h -- Calculate Offset
local Pos = script.Parent.HumanoidRootPart.Position -- Calculate Player Position
Camera.CFrame = CFrame.new(Pos,Pos+Camera.CFrame.LookVector) + CO-- Move cf forward n units and up h units
Camera.CFrame = CFrame.new(Camera.CFrame.Position,Pos) -- Make Camera Focus On Player
end)
its change to other side if its 20 he move left and if its =20 he move right but I want it to move forward (Move = look) + I have question do you know how to force player to face (look) forward