Writing an FPS framework (2020)

Is there any other way to make aiming?

What i got:
https://gyazo.com/c00ecb1fdb1c36105fb94be53fb86811

This isn’t best way to make ADS’ing as i see. I tryed making invisible part where i would like to make camera be when ADS’ing. I made this using tween but this was so bad…
Maybe you know any other ways to make ADS?

Edit: I mean i would like to make move camera or something to invisible part near scope and not just under scope. for AR its pretty good but as you can see its not quite in good spot for snipers.

I don’t understand and don’t know any other consistent reliable ways to get aiming going with weapons aside from some stupid ways i tried in the past like animations.

Edit: I mean i would like to make move camera or something to invisible part near scope and not just under scope. for AR its pretty good but as you can see its not quite in good spot for snipers.

The edit doesn’t help much, but If I DO understand, you didn’t try to adjust the aim offset to work better??

Do you mean changing this thing? I tryed changing second paramenter (self.lerpValues.aim.Value) but this doesn’t help.

I tryed searching where do you set first paramenter but didn’t found anything… Can i know where do you change

self.viewmodel.offsets.aim.Value?

I found this CFrame values but i can’t just change value here it should be set inside script and i can’t find where you set this value…

Screenshot_278 – копія Screenshot_279

It’s explained in the tutorial, although a bit dug-in.

The CFrame has to be edited using the commandbar;

> workspace.Camera.viewmodel.offsets.idle.Value = CFrame.new(rightLeft,upDown,frontBack) * CFrame.Angles(rotUpdown,rotLeftright,rotRoll)
This is a command line job. replace the variables with numbers to get a nice looking offset, and eventually we will get something like this:
image

A plugin to make this easier is coming along with style changes and the other “planned” stuff. My schedule for these things is more random than the fucking atmospheric noise, though…

3 Likes

oh so i setting this value as i want and then copy this new CFrame value object and put it into weapon offsets?

image

2 Likes

Thank You For This Tutorial It Will Most Likely Take Me 1 Hour To Read Well Lucky Me I Got Nothing Else To Do! :sweat_smile:

2 Likes

1- Any other good spring module you got(made by anyone).
2- I maybe got my wording wrong, my question is what’s the math behind it by checking for force axis if it’s equal to inf or -inf then set it to 0 what’s the math behind it, the idea.

How can i change players weapons while player in game? I have two values that says which weapon player have, but if i change it nothing will happen as i need to update my weapon list somehow. For example i have “Pistol” and “Sniper” i change my values and now i should have “Sniper” and “Assault Rifle”. but i need to update it.


Edit: Nevermind i solved this.

1 Like

@HugeMark305

  1. no
  2. if the spring goes fucking nuclear for some reason, it’s reset back to 0

@zamd157

  1. Modern code - it better not be full-on PascalCase.
  2. Try using another animator and making sure backweld has no Part0 set, remove it temporarily for animation if possible. I have a backup of the old moon suite if you need it.
4 Likes

The welds are a studio setting, I can’t remember which one though

Just a heads up – FC now comes with all of these things out of the box, as well as the ability to manually manipulate projectiles during runtime (alter position, velocity, and acceleration at any time on demand). It was added in v11.0.0 (click for the changelog). Whether or not you edit the thread to mention this is ultimately up to you.

Aside from that, this is a super solid tutorial that goes over a lot of stuff that even I was curious about (specifically first person animations and how all of that was done so cleanly in other games), and I do appreciate the shoutout too :stuck_out_tongue:

11 Likes

Where can i edit how far it can move my weapon when i rotate? Currently its too powerful and because of this you can rotate and see the end of my arms which is not good :frowning:

https://gyazo.com/da9a87623750d3ed147a9781cb869e21

the :update() function has the code for sway

Hey, this is probably a stupid question, I’m a novice scripter. How would we get the animations to load in? This is what I get in the error logs:

This is what it looks like:

Sorry for the odd questions, I’m just a bit confused.

reupload the animations and change the IDs in the viewmodel animation folders

1 Like

If you could send the link to them that would be great!

image
Import with the IDs for these animation objects

1 Like

Thank you for the tutorial! I have not actually looked into it quite yet but I played the game to see if it was actually going to lead me to making a good gun and it very well looks like it will. The gun looks great!

By the way I have made bullets with trails before, and without reading the tutorial yet, I think you’re using beams if I am correct. However when the gun shoots the bullet looks like it spawns further from the guns muzzle. I don’t know if this is done on purpose but when I was making my RTS I discoverd that if you put a :wait(.05) after you sets the bullets CFrame before you tween it, the glitch will be fixed.

2 Likes

nice tutorial, very well done.

1 Like