I use Raycasting systems, but I dont know if they are the best system I can use. I was looking for something more realistic.
Something like this:
(the game was Zeppelin Wars)
Basicly I was looking for do one system just like this (the bullet the effect etc…) I dont know if I still can use Raycasting or If I have to use one bullet with TweenService.
Tweenservice is a bad idea, use cframe.lookat at the mouse.Hit.p or raycasts, and loop the ammo.pos += Vector3.new(0,0,1) also add a fire on the bullet if you want the effect , and connect a script.Parent.Touched on the bullet and damage the player whoever touches it then destroy the bullet , therefore you should use meshes for guns and for bullet too.
Using .Touched on small, fast objects such as bullets is a terrible idea. It’s not reliable enough to count all the hits and due to the fast nature of the bullet, it might just skip the object entirely and appear to go through it. You must use either segmented raycasts (if you don’t want hits to be instant) or one raycast to have proper hit detection.
Correct. Sometimes Fast small moving objects can cause something called “Tunneling”. Its when a small moving object skips over the thing it may potentially collide with due to the large update in position per frame.
If the fast small bullet approaches a very thin wall like glass , then if it’s going too fast , the next frame will change the position and make it skip the thin wall entirely.
@thatzenguy is right, to combat this issue, create a ray cast from its position in the previous frame to its new position in the new frame every frame. Then destroy the racist variable and set it to nol so it won’t cause memory leaks.