I'm trying to script build and here is what I have so far:
chr = workspace.supercoolguy53 mouse = game.Players.LocalPlayer:GetMouse() part = Instance.new("Part",chr) part.CanCollide = false part.Anchored = true part.BrickColor = BrickColor.White() part.Transparency = .9 part.Size = Vector3.new(7,7,7) mesh = Instance.new("SpecialMesh",part) mesh.MeshType = "Sphere" part.Touched:connect(function(p) local h = p.Parent:FindFirstChild("Humanoid") if h and h.Parent.Name ~= "supercoolguy53" then h.Parent:Destroy() end end) mouse.KeyDown:connect(function(key) if key == 'q' then wait() clone = part:clone() clone.Parent = chr clone.Name = 'part1' wait() for i = 1,500 do game:GetService('RunService').RenderStepped:wait() clone.CFrame = CFrame.new(clone.Position + (clone.CFrame.lookVector*1)) end end end) clone.Touched:connect(function(pA) local h = pA.Parent:FindFirstChild("Humanoid") if h and h.Parent.Name ~= "supercoolguy53" then h.Parent:Destroy() end end) while game:GetService('RunService').RenderStepped:wait() do part.CFrame = chr.Torso.CFrame end
It only shoots one way, and if the clone touches someone else they don't get destroyed. But if someone touches the original part they get destroyed:
In my opinion, it's better (and easier) to use body movers (BodyVelocity) when working with projectiles.
player = game.Players.LocalPlayer mouse = player:GetMouse() repeat wait() until player.Character chr = player.Character template = Instance.new("Part") --We're not going to put it anywhere, it's just a template. template.CanCollide = false template.BrickColor = BrickColor.White() template.Transparency = .9 template.Size = Vector3.new(7,7,7) template.TopSurface = Enum.SurfaceType.Smooth template.BottomSurface = Enum.SurfaceType.Smooth bv = Instance.new("BodyVelocity", template) bv.maxForce = Vector3.new(math.huge, math.huge, math.huge) mesh = Instance.new("SpecialMesh",template) mesh.MeshType = "Sphere" mouse.KeyDown:connect(function(key) if key == 'q' then local projectile = template:Clone() projectile.Parent = chr projectile.Name = 'Projectile' projectile.CFrame = chr.Torso.CFrame projectile.BodyVelocity.velocity = chr.Torso.CFrame.lookVector * 120 projectile.Touched:connect(function(pA) local h = pA.Parent:FindFirstChild("Humanoid") if h and h.Parent.Name ~= player.Name then h.Parent:Destroy() end end) wait(4) projectile:Destroy() end end)