So I’m working on a gun, and I want in a local script when you shoot it places a part where you click your mouse to visualize a bullet, but I want to make it so a ball flys to the spot, to visualize a bullet trail.
Just add some particles on that bullet and script it. Don’t just ask the forum to complete things for you.
There’s free models from like 2008 that could work, you could pretty them up in the process.
I suggest using ParticleEmitters (for muzzle flash) and a beam to create a trail from point A to point B.
You didn’t understand what I was asking
What do I search in the toolbox for that
A lot of free models have this effect, I think if you just look up generic names of what your looking for you can find one easily.
Im looking but all that pops up is newer guns
I don’t have a link anymore but I remember when I needed a weapon for a team vs team event I looked up “AK-47” and the one I found had the effect, you can try that I suppose.
If you put a bullet part in Replicated Storage or Server Storage, you can use TweenService to make the bullet fly to the position that the player shot. I am assuming that you have already linked the client and the server, and on the server you have the position the player shot.
Example: (not tested yet)
local TT = game:GetService("TweenService")
local bullet = game.ReplicatedStorage.Bullet
local function shot(pos)
local tweeningInfo = TweenInfo.new(
0.3, --length
Enum.EasingStyle.Back, --easing style of the tween
Enum.EasingDirection.Out, --easing direction of tween
0, --number of times tween will repeat
false, --if the tween repeats or not
0 --delay between each tween
)
local BulletClone = bullet:Clone()
BulletClone.Parent = workspace
BulletClone.Anchored = true
BulletClone.CanCollide = false
BulletClone.Position = tool.GunModel.Position
local partProperties = {
Position = pos
}
local Tween = TT:Create(BulletClone,tweeningInfo,partProperties)
Tween:Play()
end
(function where shot is called)
shot(pos)
Please note, I have not tested this code yet, and it could be wrong, you can also set up a particle effect that plays on the gun itself when it is fired, but I believe that should be pretty easy to do.