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

Trying to make a camera that follows the player but doesn't allow them to look around?

Asked by 5 years ago

I've been trying to make a third person shooter by having a part welded to the player and then making that the camera but the attach mode still allows the player to look up and down. How do I stop that?

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

The following CameraTypes will prevent the player from shifting the camera's y angle using PageDown / PageUp:

Watch, Scriptable, Fixed

You could also try to change the action performed by using PageUp and PageDown with the UIS (UserInputService)

game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.PageUp or inputObject.KeyCode == Enum.KeyCode.PageDown then
        --Event
    end
end)
Ad

Answer this question