Writing an FPS framework (2020)

ye i just made my own solution,

How would I go about doing the camera CFrame when you reload. I did the animation and use RunService and Camera.CFrame = CameraBone.CFrame but it’s like recoil now…

Sheesh that was an amazing tutorial thanks.

ok, so… now when i try to animate the idle anim… and i try to move the right arm, it just moves the rest of the viewmodel… any help?

that’s either a problem with the roblox animation editor or you rigged it wrong. i recommend using blender when you animate things

Go to the gun → animations → reupload the animation from the movement in the animation and you should be good

what viewmodel u use in the tutorial, blackshibe? pls send me a link

Very cool tutorial 9/10

(30 30)

Im having a problem where when I re-upload the animations and set the ID’s it just makes my character spin for no reason. Also the idle animation wont work. How would I fix this?

For some reason when I try firing, my gun won’t fire.

It seems the line:


if not tofire then return end

is returning. Any idea why this may be?

tofire is true when the left mouse button is pressed, and false when it’s released
you are doing something that causes it to always be false

1 Like

I DON’T CHECK THE DEVFORUM ANYMORE

GOT QUESTIONS, NEED ADVICE, HAVE A PROBLEM? PLEASE DM ME INSTEAD: https://blackshibe.github.io/

Getting error ReplicatedStorage.spring:25: attempt to index number with 'X'

Edit: fixed it

You can just alter the code to use R15 bones.

Hello,

These tutorials were very useful for my framework, i managed to add attachments and alot of other stuff.

In a game BlackShibe made called “Deadline” once you move your camera around the gun ever so slightly orientates itself in the direction the camera is moving.
I have been searching all over the DevForum and could not find any explanation this.

Does anyone here know how this works?

create a vector2 for keeping track of rotation in your class, add mouse movement to it every frame, and then if it’s magnitude is higher than some arbitrary value (0.3) set it to your_vector2.Unit * 0.3

after that you just rotate the viewmodel by that value same way you rotate it based on bobbing

1 Like

Hi, sorry to bother you

I tried to implement this in a really crap way but it didn’t work (it literally went flying away) and I have absolutely no idea what to do. Would you mind explaining what to do in further detail?

If you reload (press ‘r’) when you do not have a gun equipped it will break the game.
To fix this just check too see if the gun is equipped before reloading like this in the inputController

inputs.BindOnBegan(nil, "R", function()
	if weapon.equipped == true then
		weapon:reload()
	end
end, "ReloadPewPew")

Just do a if check like “if not weapon.viewmodel then return end”

This also happened to me, could not reply earlier as i was busy.