Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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]]

3 comments

0

not sure if you wanted first person lock but just look into this and see how it fits your problem:)

0

yeah i didn’t want that. But thanks for some help!

0

see if my edit is of any help

This discussion is preserved as it was. New answers, comments, and votes are closed.