Camera Scripting

How might I add an offset to the mobile player’s camera?

if mobile then
	local GameSettings = UserSettings().GameSettings
	local IsLocked = false
	local Humanoid : Humanoid = nil
	GameSettings.RotationType = IsLocked and Enum.RotationType.CameraRelative or Enum.RotationType.MovementRelative
	if Humanoid then Humanoid.CameraOffset = Vector3.new(IsLocked and 1.75 or 0,0,0) end
else

Anyone? Still in need of a solution…

Vector3.new(IsLocked and 1.75 or 0,0,0)
If IsLocked is true then it will equal be the same as Vector3.new(1.75)
Instead you should do IsLocked and Vector3.new(1.75, 0, 0) or Vector3.zero

And can I add an offset to the player’s camera?

The code should already work you just need to define Humanoid

Okay so when I define the humanoid, the offset should work?

if there are no other errors in the script then yes

Alright, will try it out when I get a chance

Thank you very much… have a good day

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.