Writing an FPS framework, part 2 (2020)

you can place a surface GUI with the raycast result and then cauculate the position

non procedural animation is basically standard nowadays
it’s just fine apart from that

1 Like

i don’t see how i would get started with procedural animations. i’ve been trying lately but i’m trash, do you have any tips?

Hey it’s me again… I have one last question to ask… how do I make separate fire modes such as, Semi-auto, burst, pump, and bolt action?

give weapons unique IDs and setup a currentWeaponData table in the client framework based off of those IDs, you can also store stuff like ammo and barrel heat there as well

I will update the tutorial to have this again at some point, self.firemode[weaponName] is a bad way of doing it

2 Likes

For anyone having issues with the raycast starting underneath the map or in odd spots, please refer to
this post.

TLDR; Anchor the rootPart of the viewmodel if you haven’t already.

5 Likes

I got into a bug/error and I need some help, I want it that you can equip 2 guns and when I try to equip it I just get this:CwEckbiJOd
It equips and unequips right away

Here is the error message in the output:
RobloxStudioBeta_dEeqBEsKec
Server (script):
RobloxStudioBeta_v0lduVru7Q
I appreciate any help, thanks!

btw the tutorial is great!

2 Likes

(aaaaaaaaaaaaaaaaaaaaaaaaa)and what is the 117th line?

Here:

I have no clue what’s the problem

2 Likes

It’s probably not configured correctly and the server forces it to remove itself

But I don’t know how to configure it correctly then, and when It’s only 1 gun It works and all but here are some pictures/gifs:
image
rIKve4crCk

1 Like

Are you also by chance planning on making a proper reloading system? Theres a Reload event in WeaponRemotes that isnt being used.

Dumb question but,

On the server security part, can you elaborate on how would I make a specified shot ID?
Did you use CollectionService? Or maybe making a random number?

@thom463s
no
@TheFearlessMe
random number requested by the client between -10000 and 10000

How would I make sprinting, also moon animator is outdated how do i animate the view model

not to be annoying, but the muzzle flash is broken and i had to fix it:


k thx

1 Like

I do sprinting with sine waves but you can just export it to blender or use the default animator/new MAS if you’re only doing animation

1 Like

OOF, sorry for being like the most annoying person in the world but I notice you are doing ammo with tables, and I am not sure how I would make an “ammo HUD” if the ammo is in a table.
mk quick update I found out how but I have some problems, It only updates it when I shoot so when I reload its still at “0/0”
i put the line of code below “RenderStepped”

well anyways sick tutorial :smiley:

And just for clarification, the ID thing is to basically stop exploiters from just firing random hit remotes to the server by making sure the firing client has the same ID they sent from when the gun was fired, right? Or did I understand it wrong?

@TheFearlessMe
confirming every shot was actually fired when there was ammo inside of the gun, plus hit verification for when it hits and needs to compare against where it was fired from
@BottomLess_VORTEX
If i remember correctly ammo in the current magazine is a table value referenced by the current weapon name. If you don’t want to do this you may want to use a whole table that’s weapon-specific and store the ammo there (I have been doing this for a few months, but I would need to update the tutorial)

1 Like

why can’t I upload the animation