I am making a camera that follows your character and I used BodyPosition to follow my character, but it doesn't look very smooth and I'm wondering if anyone can help me make it more smoother.
https://gyazo.com/33b1859e12525ca9e5c940b57c29a0fb
This is what I got so far
local torso = script.Parent.HumanoidRootPart
local center = Instance.new("Part")
center.CanCollide = false
center.Size = Vector3.new(1,1,1)
center.Parent = game.Workspace
center.Transparency = 1
local bp = Instance.new("BodyPosition")
bp.maxForce = Vector3.new(9e+100, 9e+100, 9e+100)
bp.P = 40000
bp.Parent = center
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
repeat wait() until player.Character
camera.CameraType = "Scriptable"
local bp2 = Instance.new("BodyPosition")
bp2.MaxForce = Vector3.new(9e+100, 9e+100, 9e+100)
bp2.P = 40000
bp2.Parent = camera
while torso.Parent do
center.BodyPosition.position = torso.Position + Vector3.new(0,7,26)
camera.CFrame = center.CFrame
wait()
end
center:Destroy()

1 comment
Try using RunService.RenderStepped since a while loop loops around ever 0.03 seconds which would not be effective for camera manipulation.