You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
When you load in, the camera is above the player, and not in their head.
What is the issue? Include screenshots / videos if possible!
I can not figure it out.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked here, but couldn’t find anything.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
player.CharacterAdded:Wait()
player.Character:WaitForChild("Head")
camera.CameraSubject = player.Character.Head
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 110
game:GetService('RunService').Stepped:Connect(function()
camera.CFrame = CFrame.new(player.Character.Head.Position) * CFrame.new(0,0,0)
end)
It absolutely isn’t the best way to do this, but try this script:
local Players = game:GetService("Players")
local runService = game:GetService("RunService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head: BasePart = character:WaitForChild("Head")
local distance = 20 --// Change this to how many studs you want it to be above the player's head
local camera = workspace.CurrentCamera
local part = Instance.new("Part")
part.CanCollide = false
part.Name = "CameraPart"
part.Transparency = 1
part.Parent = character
camera.CameraType = Enum.CameraType.Scriptable
camera.FieldOfView = 110
runService.RenderStepped:Connect(function()
part.CFrame = head.CFrame
part.Position += Vector3.new(0, distance, 0)
part.Orientation = Vector3.new(-90, 0, 0)
camera.CFrame = part.CFrame
end)