This is inside a RunService.RenderStepped function and my goal is to make the camera always be the heads position but be able to move around like a normal camera.
I set the camera type by doing this before changing the CoordinateFrame: camera.CameraType = Enum.CameraType.Scriptable and it still doesnt change anything, no errors in output aswell
local camera = workspace.Camera
local rs = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")
rs.RenderStepped:Connect(function()
camera.CFrame = head.CFrame
end)
So reading your problem carefully: Your camera is going to the head, but preventing you from looking around. You want to put the camera where the head is but still have the player look around, “realistic” as you say.
This sounds like a “first person camera system” to me, and we can do this with a simple property.
…
Select StarterPlayer
Open properties menu and change CameraMode to “LockFirstPerson”
Boom we have a camera snapped to the position of the head where we can still look around, a “realistic” camera as you call it!
I dont want to do that because you are setting the cameras cframe to the heads cframe meaning if the head turns the camera turns with it, plus i just tested it
local camera = workspace.Camera
local rs = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")
rs.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(head.CFrame.X, head.CFrame.Y, head.CFrame.Z+15)
end)
It’s not too difficult to add an offset, this will follow the character from behind.
Ik but i want a camera offset, and when i do that if i turn fast enough i can see my body in FIRST PERSON so im making the the camera snap to the heads position
Then why did you add an offset in the original script? You’re probably getting offset conflated with FOV, change that property instead if required and set the camera to first person mode as the above post has shown how to do.
First person with an offset makes no sense if you think about it.