CosmeticBullet / FastCast

  1. What do you want to achieve? The bullet was looking in the direction where the player was shooting

  2. What is the issue? -

  3. What solutions have you tried so far? I tried to look solutions on devforum

Hello, how I can make the bullet face the direction it is shooting?

cast.LengthChanged:Connect(function(ActiveCast, lastPoint, rayDir, displacement, segmentVelocity, cosmeticBulletObject)
	local newpos = lastPoint + (rayDir * displacement)
	
	cosmeticBulletObject.Position = newpos
end)

I used a translator for this text, so if something is not clear, then I will try to explain

I’m still here and I need help with this

Can someone help me please? Im really dont know how i can rotate bullet correctly

cosmeticBulletObject.CFrame = CFrame.lookAt(newpos, newpos + rayDir)

Sorry for long answer, thats not working

Your ray’s direction may be miscalculated then.

I dont think so, here is my code

local hit = plr:GetMouse().Hit

local cast = fastcast.new()
local behavior = fastcast.newBehavior()
		
local params = RaycastParams.new()
params.FilterDescendantsInstances = {char, camera}
params.FilterType = Enum.RaycastFilterType.Exclude
		
behavior.RaycastParams = params
behavior.Acceleration = Vector3.new(0,-50, 0)
behavior.AutoIgnoreContainer = true
behavior.CosmeticBulletTemplate = replicatedstorage.Bullets.Bullet
behavior.CosmeticBulletContainer = workspace.Projectiles

local direction = (hit.Position-Pos)*1000

cast:Fire(camera.AK47.Fire.Position, direction, 1000, behavior)