I am making this beam script (which you might know from previous questions) which creates a line of parts (Balls). But when I try to destroy them after they shoot, the beam stops after a quarter of it has been shot out. Help pls! script:
player = game.Players.LocalPlayer
mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "f" then
wait(0.5)
for i = 3,60 do
wait()
earth = Instance.new("Part",workspace)
earth.Shape = "Ball"
earth.Size = Vector3.new(1,1,1)
earth.CanCollide = false
earth.BrickColor = BrickColor.new("Bright red")
earth.Anchored = true
earth.CFrame = player.Character.Torso.CFrame * CFrame.new(0,0,-5+-i) * CFrame.fromEulerAnglesXYZ(math.random(),math.random(),math.random())
player.Character.Torso.Anchored = true
my = game.Lighting.Script:Clone()
my.Parent = earth
end
player.Character.Torso.Anchored = false
end
end)

2 comments
But, when I tested it it only removes the first block of the beam... This script shoots out a bunch of randomly rotated blocks in a line. So the farthest one only gets removed.
Oh, I see what you mean. Let me show you how. Edited script.