Writing an FPS framework (2020)

@BlackShibe
This is great, I am looking forward to learning more about FPS framework and scripting, There is one big problem, the gun gets slapped to the center of my screen, how would I fix this? It can get a bit annoying at times and I am not sure how to fix it.

1 Like

Yeah, maybe this bit of the tutorial will need to be less dug-in. @YT_Gamer1212 I believe this is the solution for your problem.

Do you have recommended coords, and if so what do I do after I find them?

trial and errors since different gun meshes or game styles have different recommended coords

I tried to dig it out a little bit by adding a header, it’s 7.1. now
image

fun fact, I actually thought I forgot it when someone else asked about the offsets because i literally could not find it in the tutorial

2 Likes

Nice tutorial!! Thanks for sharing!

4 Likes

For all those that want to add an aiming part (AIM_PART) instead of having to try’n’error the offset, put this line in the update() function before aimOffset is calculated.

self.viewmodel.offsets.aim.Value = self.viewmodel.AIM_PART.CFrame:ToObjectSpace(self.viewmodel.rootPart.CFrame)
5 Likes

That could be fixed with some simple bool value coding, correct me if I’m wrong.

1 Like

Extremely nice and well-detailed article. I will start making my first FPS now. :))

I thought I was the only one who said coolio. I am not alone! :DD

1 Like

While rigging, my priority is all messed up. I can’t get most of my motor 6d’s to show up. I’ve tried so many different setups and so far, nothing has worked. Is it possible you could show what your setup was for the picture of you animating the arms? Or does anyone else have a similar setup they could share? Thanks. Also, I can’t look at the example place for guidance here as the animations aren’t public and won’t let me import them. Several people appear to be having rigging issues as that section was not transparent and we can’t see your set up.

Edit: I’ve made it this far but the parts won’t rotate, they just snap back into place.

Anyone know why this is happening and how i can fix it? I followed the tutorial as shown
https://gyazo.com/4466649ce7f81fb7b8fe6f4d1d0829ed

Great tutorial but I ran into a problem. Using the system, if I were to publish it and set to R6, it works, but not great. Here is what I mean.

The gun itself still functions, but as you can tell from the image, isn’t functioning visually.
Any help why this is happening?

1 Like

Hey, how would I go about making r15 viewmodels?

1 Like

mass reply

@ruinzxxa
the viewmodel seems to be running on something that isnt the renderstepped loop
i wasnt notified of the reply and need to see code to find out

@adeformed_kidYT
it uses animations, reupload those as stated in the original post
if that doesn’t work, make your own

@KazabiteBoltiz
rigging a r15 viewmodel
(don’t actually do that, they look horrendous so just use an anthro rig)

1 Like

I meant scripting the r15 viewmods. I am using anthro rigs already :smiley:

1 Like

Literally no difference. The game does not interact with them at all. only thing is you’d probably have to do inverse kinematics.

2 Likes

you could try adding the following to the unequip function

if self.firing then self:fire(false) end

I will test it myself soon

2 Likes

Astonishingly helpful tutorial. Learned a bunch about rays and viewmodels in under an hour because of your information. One question I have, though, is how you would go about making custom guns (shotguns, rocket launchers, etc.). I’ve tried making my own module script with different weapon IDs, but I guess I’m not smart enough (yet) to do something like this. Any help would be much appreciated.

1 Like

that’s something that requires a bit more work. I’ve done this in a very scalable way myself, update coming someday ( I have a place to dump the old tutorial now so I can update it, i have my own website )

ok but how

the “weapon handler” in the tutorial becomes a movement controller with weapon support, and gun functionality is split into a separate module with a keybind map to control which buttons do what per-gun.
image
you can also cache viewmodels for better equip performance during this step.
I will elaborate on this soon (maybe even this year?)

2 Likes

What do you add for to animate? when I click on the viewmodel (arms) It only adds up CFrame and stuff, I’m trying to make a run animation…