I wanna know how to make a script that makes players keep their camera in one position and can't turn the camera around. Also should it be in a local script? Any help would suffice, Thanks!
Maybe disable the possible ways of turning the camera?
01 | --[[elseif input.KeyCode == Enum.KeyCode.Comma then |
02 | local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), -eight2Pi * (3/4), eight2Pi) |
03 | if angle ~= 0 then |
04 | this.RotateInput = this.RotateInput + Vector2.new(angle, 0) |
05 | this.LastUserPanCamera = tick() |
06 | this.LastCameraTransform = nil |
07 | end |
08 | elseif input.KeyCode == Enum.KeyCode.Period then |
09 | local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), eight2Pi * (3/4), eight2Pi) |
10 | if angle ~= 0 then |
11 | this.RotateInput = this.RotateInput + Vector2.new(angle, 0) |
12 | this.LastUserPanCamera = tick() |
13 | this.LastCameraTransform = nil |
14 | end]] |