Why does my gun shoot upwards after the first shot or two? [SOLVED]

I’m making a gun.

The guns works perfectly other then the fact that the gun shoots up into the air after the first few shots.

I absolutely have no idea why.

It seems to aim up when I hold the trigger down, but if I tap the button slowly it doesn’t occur as much.

Here are the important parts of the gun what do the damage and stuff.

LOCAL SCRIPT:

SCRIPT:

If you need to know anything else, please ask or if you need to see a video of what is happening, just ask me.

Thanks to anyone who helps!

Hey, kittonlover101.

Sounds like to me, that you are using First Person guns?
If they are Vanguard guns I recommend changing the recoil settings.

Without giving any more details I’m afraid I can’t help you any further.

Good luck!

  • DrBaja

As this post is solved, please make a reply to your own post and tell how it was solved, and mark it as solved, as opposed to just changing the title. Thanks! :slight_smile:

This is very late, but it was because the bullet trail was getting in the way of the next shot, so when I removed the bullet trail I had no issue. Kinda sucks I don’t get a bullet trail, but what can you do.

Your code posted in the OP isn’t showing up. In any case, I will assume you’re using raycasting for your guns. You can use the FindPartOnRayWithIgnoreList method, which accepts, as an argument, a table of instance objects to ignore when finding the hit part of the ray. You can then add all of your bullet trails to this ignore list, meaning that they will not affect the raycasting logic of your weapon.

Additionally, it is likely best to modernise your approach to creating bullet trails, and use the new Trail instances (which are designed effectively for this purpose). This will also alleviate your problem, as trails are just particle effects which won’t interfere with raycasts.

I quit the project because my friend did, but thanks.