For a project I'm making, it involves firing projectiles from the players torso. I'd like to make these projectiles aimable, so they fire in the direction the player is facing. Here's what I have so far.
Player = script.Parent.Parent
Mouse = Player:GetMouse()
Character = Player.Character
function Damage(part)
if part.Parent.Humanoid and part.Parent.Name ~= Character.Name then
Disc:Destroy()
part.Parent.Humanoid.Health = part.Parent.Humanoid.Health - 25
end
end
function onKeyDown(key)
key = key:lower()
if key == "f" then
Disc = Instance.new("Part",workspace)
game.Debris:AddItem(Disc,3)
Disc.CFrame = CFrame.new(Character.Torso.Position,Mouse.Origin.p)
Disc.Rotation = Vector3.new(Character.Torso.Rotation)
Disc.CanCollide = false
Disc.Transparency = 0.5
Disc.BrickColor = BrickColor.new("Bright orange")
Disc.Size = Vector3.new(2,2,2)
Fire = Instance.new("Fire",Disc)
Cylinder = Instance.new("CylinderMesh",Disc)
Cylinder.Scale = Vector3.new(2.3,0.5,2.3)
Velo = Instance.new("BodyVelocity",Disc)
Velo.Velocity = Disc.CFrame.lookVector*90
Velo.maxForce = Vector3.new(math.huge,math.huge,math.huge)
DamageScript = game.ServerStorage.Script:Clone()
wait(0.25)
DamageScript.Disabled = false
Sound = workspace.Sound:Clone()
Sound.Parent = Disc
game.Debris:AddItem(Sound,3)
SP = math.random(60,80)/10
SV = math.random(5,10)
Sound.Volume = SV
Sound.Pitch = SP
Disc.Touched:connect(Damage)
end
end
Mouse.KeyDown:connect(onKeyDown)
The projectiles does fire, but it only fires from one direction. Any ideas as to why this is not working?

2 comments
You have lookvector from disk cframe, should be player's torso crame on line 25. This is a reason to why it is not moving..... my answer still stands
I had figured that out earlier and forgot to get back to you. My apologies.