-
What do you want to achieve?
The bullet will goes straight into where the mouse.Position.X,Y and Z is.
Example :
-
What is the issue?
The bullet will goes straight down to the ground. -
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?