Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I make it that players can't move their camera?

Asked by
Grazer022 128
3 years ago

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!

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Maybe disable the possible ways of turning the camera?

--[[elseif input.KeyCode == Enum.KeyCode.Comma then
                local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), -eight2Pi * (3/4), eight2Pi)
                if angle ~= 0 then
                    this.RotateInput = this.RotateInput + Vector2.new(angle, 0)
                    this.LastUserPanCamera = tick()
                    this.LastCameraTransform = nil
                end
            elseif input.KeyCode == Enum.KeyCode.Period then
                local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), eight2Pi * (3/4), eight2Pi)
                if angle ~= 0 then
                    this.RotateInput = this.RotateInput + Vector2.new(angle, 0)
                    this.LastUserPanCamera = tick()
                    this.LastCameraTransform = nil
                end]]
0
not sure if you wanted first person lock but just look into this and see how it fits your problem:) MOREHOURSOFFUN 104 — 3y
0
yeah i didn’t want that. But thanks for some help! Grazer022 128 — 3y
0
see if my edit is of any help MOREHOURSOFFUN 104 — 3y
Ad

Answer this question