The First Person Element Of A First Person Shooter

@redduckxteen @xCurb making custom animations for viewmodels and enhancing them with these requires a different workflow, tho the ADS and the server side replication might be the same, most of the viewmodel setup would be different, in this case, the arms wouldn’t be attached to the weapon, the weapon will be attached to the arms using Motor6D-s they are the bones, the joints that allow for rigging and animating custom models, i put an animation controller that lets you animate them without humanoid properties (like forcing collision with the actual player), and yes they do require 2 different animations as what you see in FPS is usually very different as to what others see attached to the character, it’s possible to work with 1 animations but you’d need to play arround with camera offsets for each weapon for optimal results.

13 Likes

Thank you, this was very useful

2 Likes

Is there a way I can animate the tool in first person?
Currently when I play the reload animation it just does this:

com-video-to-gif%20(1)
The weapon is supposed to go off screen, like this:
com-video-to-gif
I am also playing the animation in the view model as well, and I have tried using a Motor6D, yet it doesn’t do anything.
@EgoMoose

Edit:
I figured out how to fix this issue incase anyone was wondering. It turns out that there is a Motor6D in the head which was putting the weapon in the correct position. This unfortunately does mean I have to remake the Animation to be rigged properly, but at least I figured it out.

12 Likes

How can i play the animation in the view model? Can anyone explain to me how can i add an animation on the view model, i’m trying to figure it out.

4 Likes

I would greatly appreciate it if you explain just a little more how you solved this, I know that there is a motor 6D, but how do i go about rigging the model properly now?
I’ve tried many things, and i already have an Animation Controller, all i need to know is how to rig the model.

2 Likes

I stumbled upon FastCast not too long ago and have since tried to integrate it, but I haven’t really found the place to start. I’m curious to know how you were able to go about this.

And of course, thanks to EgoMoose for this outstanding resource!

Hey :slight_smile:

I tried it but It is causing errors because FastCast runs when the tool is equipped
and in this tutorial you get the gun when you spawn

maybe some changes to equip it as a tool, it might work?

(Idk anything about scripting so I might be wrong)

For Attaching the weapon to the view model it only takes the handle, not the entire model…

i made a system very similar to yours using the same positioning method of updating the head cframe to the camera cframe every frame/renderstepped (everything else is different), everything works fine except for when i zoom in to first person my character starts to shift slowly in the direction i am pointing towards, all parts are set to anchored = false, cancollide = false. the internal structure of my view model is the same as yours, just with different part names, any help? if you need more info i can provide that

Is it possible to have the viewmodel rig as r6 but have the character as r15? please someone help me ive been looking around i cant seem to find a way.

If the Viewmodel has a humanoid then the parts will become cancollide.
Set the parts collisiongroupid to 1, and in the collision group editor, add a new collision group that doesn’t collide with anything.

That’s the best I can explain it, sorry.

2 Likes

i found out that wasnt the case it because i named it UpperTorso and Roblox automatically cancollides it

2 Likes

How can I use this system for multiple weapons, like I have a gun and a knife.
Also, is there a way I can bend the elbows in this system?

2 Likes

SHA BAM! Bookmarked. Will definetly come in handy for my “Quantum Destabilizer” and “Magentism Gun” for my gravity falls game.

1 Like

Thank you this will definitely help me with my FPS game, Overbooked.

2 Likes

If i wanted to have gun go like 90 degrees i would have to use animations for head but its anchored

My gun is turned around and pointed at me instead, how do I fix this?

I’m having trouble attaching the actual viewmodel to the camera, nothing happens when I start the game and test it can anybody help me out?

1 Like

Judging from how this tutorial did it, your view model is more than likely facing downwards, which is why you cannot see it, but if you made the head’s CFrame become the camera’s CFrame each frame and parented it to the camera, it should work nonetheless - the viewmodel is just out of your view. Try inserting the gun and you should see it as it’s part of the viewmodel via script.

I fixed this myself by just countering this. I rotated it by 90 degrees the opposite direction