Projectiles and how to move them

I want to move my projectile to the mouse pos, I’m not sure what to use to move the projectile. I want the projectile to be deleted if it hits a wall, if it hits a player I want it to damage it and then be deleted if it doesn’t hit anything I want it to fly for 5 seconds then be deleted. I was wondering what games like pf use to move there projectiles.

2 Likes

Two options are to either use Lerping , or roblox physics and Velocity. However I wouldn’t recommend velocity for a large scale game like a shooter.

In response to your question about phantom forces and other FPS’s, most do not use physical bullets at all. Most just use Ray’s to create the effect of a bullet’s path, but don’t actually use a part to represent it. This is because projectiles, especially when in large numbers, can be really hard on performance.

If you are creating a shooter, I would not recommend you use real projectiles, but instead use bullet holes, dropped shells, and gun sounds to suggest their existence.

1 Like

Yes, too many items being cloned at the same time can lag the game. I tried that on studios before

1 Like

I’m making a wand system so there won’t be more then 10 projectiles at one time, it probably won’t ever be 10 at one time.

1 Like

@lavaaylla If you have any further questions, my discord is Vesyrian #4126. Feel free to dm me with them.

1 Like

i have the whole system set up I just need to make projectiles that fly, thank you so much for the help. im kind of confused, i use the rays hitpos and set the projectiles cframe to the hitpos I assume the rays are like 10 studs long so you get the zigzag effect am I right?

No, the zigzag is just multiplying the cframe of the hit pos by a cframe that uses math.random of -1 and 1 on the x and y axis when you place your projectile.
Could I see what you have already?

2 Likes

Sure I sent you a friend request on discord my tag is Auzzy#4649

May you go more into detail on this. Like maybe show me your scripts. It’s hard for me to understand. I tried to get onto your discord but it won’t work. If you want you can also send me the studio file.