local script inside StarterPlayerScripts
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local camera = workspace.CurrentCamera local hrp = character:WaitForChild(“HumanoidRootPart”) local RS = game:GetService(“RunService”) local camPart = Instance.new(“Part”) camPart.Parent = character camPart.Name = “CameraPart” camPrt.Transparency = 1 local function onLockedUpdate() camPart.CFrame = CFrame.new(hrp.Position) * CFrame.new(30,50,15) camera.CFrame = camPart.Position end RS:BindToRenderStep(“Camera”,Enum.RenderPriority.Camera.Value,onLockedUpdate)
the thing is, the camera won’t look at the player. Instead, the camera just looks forward. How do I make it that the camera looks at the player? Thanks!
I'm not 100% sure this is what you were asking for as it was kind of a confusing question but I think this could be the answer.
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local camera = workspace.CurrentCamera local hrp = character:WaitForChild("HumanoidRootPart") local RS = game:GetService("RunService") local function onLockedUpdate() local playerPos = hrp.Position local cameraPos = playerPos + Vector3.new(15, 25, 7.5) camera.CoordinateFrame = CFrame.new(cameraPos, playerPos) end RS:BindToRenderStep("Camera",Enum.RenderPriority.Camera.Value,onLockedUpdate)