Hello! This is going to be my first ever post on DevForum! I’ve recently joined back in January and have read a lot of helpful posts here in the community. Now it’s my time to ask, how do you add a Third-Person (TPS) Aim mode into the FE Gun Kit?
Here’s an example:
I’ve already made myself an over-the-shoulder camera script, but now all I need is a simple script that decreases your FOV every time you aim. Also, the key bind for this will be right-clicking the mouse or for mobile, clicking a certain button.
I’ve searched everywhere for information on how to do that, but I didn’t see any tutorials about it. If this is too much I’m sorry lmo… I just need some help here… Anyone?
When you send the input to aim, you can tween the Camera’s FieldOfView property.
UserInputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton2 then
TweenService:Create(
Camera,
TweenInfo,
{FieldOfView = AimFOV)
):Play()
end
end)
Just a tip from me, in my game I use a script to combine FOVs together.
For example, if you’re running, the running FOV value will be set to 10.
If you’re aiming, the aiming FOV will be set to -30.
Then the script takes all values and combines them with the default FOV value (70), and then set the camera’s FieldOfView to 50.
I think it’s a better thing to do than just putting if statements.