local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local hatAttachment = head:WaitForChild("HatAttachment")
local customCamPart = Instance.new("Part") --Create the cam part
customCamPart.Name = "cam"
customCamPart.Size = Vector3.new(2, 2, 2)
customCamPart.Position = head.Position --Set part position to the player head when created
customCamPart.CanCollide = false
customCamPart.Transparency = 0.5
customCamPart.Parent = game.Workspace
local attachment0 = Instance.new("Attachment") --Add attachment to the part
attachment0.Parent = customCamPart
local attachment1 = Instance.new("Attachment") --Add attachment to the head
attachment1.Position = hatAttachment.Position
attachment1.Parent = head
local alignPos = Instance.new("AlignPosition")
alignPos.Attachment0 = attachment0
alignPos.Attachment1 = attachment1
alignPos.Parent = head
alignPos.ReactionForceEnabled = true
game.Workspace.CurrentCamera.CameraSubject = customCamPart --Set the part as camera
Just started learning how to code yesterday, Im trying to recreate Elden ring's camera movement (shown in the video), but I cant figure out how to add a slight delay when the character moves, when using a LocalScript the part seems to follow the head instantly
** You are now Level 1! **