function MatchServer.RotatePlayerCamera(user,focusPosition)
local character = user.Character
local bg=Instance.new("BodyGyro")
bg.cframe = CFrame.new(focusPosition)
bg.Parent = character.HumanoidRootPart
character:SetPrimaryPartCFrame(CFrame.new(character.HumanoidRootPart.Position, focusPosition))
user.CameraMode = Enum.CameraMode.LockFirstPerson
end
I am trying to find a way to force the player to look towards the focusPosition. This function currently turns the player’s body towards it, and locks the player to first person, but their first person camera points in whatever direction they were already looking.
The user is teleported to a location, and I just need their first person view to look at the part when they teleport. After that they should have complete control over their camera.
I’m not very familiar with manipulating cameras. If anyone knows how to achieve this it would be greatly appreciated. I searched for an answer but I couldn’t really find anything.