How can I make a bullet tween have the same speed no matter where it's shooting?

Hey devs,

I’m wanting to know if it’s possible for a bullet to travel the same speed no matter where it’s going to hit in a tween.
Here’s what I have at the moment:

game.ReplicatedStorage.RemoteEvents.MakeBullet.OnServerEvent:Connect(function(plr, start, finish)
	bulletClone = bullet:Clone()
	bulletClone.Parent = workspace
	bulletClone.CFrame = start
	game.TweenService:Create(bulletClone, tweenInfo, {CFrame = CFrame.new(finish) * CFrame.Angles(start.Rotation.X, start.Rotation.Y, start.Rotation.Z)})
	plr.Character.Head.ShootSound:Play()
	flash = flash:Clone()
	flash.Parent = plr.Character.RightHand
	wait(0.05)
	flash:Destroy()
end)

make a TweenInfo.new() and then just change the time property

it should be the first number in the TweenInfo

local BulletSpeed = 10 -- How fast you want the bullet to travel
local Distance = (TweenStartPosition - TweenEndPosition).Magnitude

local TweenTime = Distance / BulletSpeed
3 Likes
game.ReplicatedStorage.RemoteEvents.MakeBullet.OnServerEvent:Connect(function(plr, start, finish)
	bulletClone = bullet:Clone()
	bulletClone.Parent = workspace
	bulletClone.CFrame = start
local MyInfo = TweenInfo.new(time to travel here)
	game.TweenService:Create(bulletClone, MyInfo, {CFrame = CFrame.new(finish) * CFrame.Angles(start.Rotation.X, start.Rotation.Y, start.Rotation.Z)})
	plr.Character.Head.ShootSound:Play()
	flash = flash:Clone()
	flash.Parent = plr.Character.RightHand
	wait(0.05)
	flash:Destroy()
end)

can’t you just do something like this?

Sure you could do that but I was just showing how he could get the time for the tween