How to make camera follow the player but player can’t move the camera angle

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

this is video

robloxapp-20210822-2031324.wmv (1.3 MB)

so I want to make player can’t move the camera but the camera follow the player I hope you understand guys

3 Likes

you mean like arsenal camera? show us vid

ok
robloxapp-20210822-2031324.wmv (1.3 MB)
so I want to make player can’t move the camera but the camera follow the player I hope you understand

robloxapp-20210822-2031324.wmv (1.3 MB)

He want’s to lock camera’s direction so he can make a runner game I guess

Yes, that is exactly what I want

please share the topic I need help because no one see my topic

uh I think no one can help me :frowning: :frowning:

Because no one helped me :frowning: 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)
3 Likes

That work ty finally one answer

but how to make the angle up .

1 Like

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)

But how to change camera rotation because camera side is wrong @dudesa3000

change N to a negative value it should work

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

So are you trying to make the player walk like a platformer? Or have the camera locked behind them in a certain direction