Roblox Camera Manipulation

hello there! im currently working on a gun system of my own for my game, i want the system to feel clean and polished so i wanted to make a nice camera effect for “recoil” where it jolts the players camera up and then a short second after go back down to its original position, how would i accomplish this?

thanks,
xordium

2 Likes

You can use Tweening to adjust the camera cframe at a desired angle and have it loop back to the normal position to create a recoil effect.

You can learn more about tweens here:

2 Likes

yeah, i have looked through that but so far i’ve only found position tweening, i dont think that would work for what im trying to achieve

Tweening can be done with most values. Instead of using Part.Position or Part.CFrame, you can use Camera.CFrame

how would it go back to the original camera angle?

Within your tween info you can set the option to bounce it back to true.

tweening confuses me, do i have to use the massive table every time?

1 Like

You only need to create it once and then you can call it whenever.

1 Like

all the examples are parts, how does it work with the camera?

Apologies for my laziness but this may be a useful article to your circumstance.

it doesnt really help me as i dont understand tweening cameras that well… thanks though!

Use a pre-made resource: CameraService - A New Camera for a New Roblox

P.s. don’t ask me how to use it.

:person_shrugging:

doesnt really help, i want to learn not to use a resource

If you want to learn rather than using resources, i recommend learning tween service, it has a very broad use and is basically fundamental to any moving part within a game, they’re not that hard to understand once you have a play around with them for a few hours.

i am attempting too, just usually examples help me learn quicker thats all

The camera has pretty much the same properties as parts when it comes to movement, just make sure the camera type is scriptable