How do i make a bullet that would goes straight into the cursor?

  1. What do you want to achieve?
    The bullet will goes straight into where the mouse.Position.X,Y and Z is.
    Example :
    image

  2. What is the issue?
    The bullet will goes straight down to the ground.

  3. What solutions have you tried so far?
    I tried to use mouse.Hit.Position.X but it didn’t works well…

			local bullet = game.ReplicatedStorage.Folders.Parts.Bullet:Clone()
			bullet.Parent = workspace
			local speed = 700
			local antiGravity = 0.9
			local bf = Instance.new("BodyForce")
			bf.Force = Vector3.new(0, workspace.Gravity * bullet:GetMass() * antiGravity, 0)
			bf.Parent = bullet
			bullet.CFrame = CFrame.new(script.Parent["AK-47 EffectsPart"].Position, mouse.Hit.Position.X)
			wait(0.02)
			debris:AddItem(bullet, 1)
			bullet.Velocity = mouse.Hit.Position.LookVector * speed

Do i need to use Mouse.Target? or what did i missed?

I use

Player:GetMouse().Hit.p

I don’t think that would works but i would give it a try

Edit : It didn’t works :skull:

1 Like

bruh you got some typos man :skull: bruh