Ok so I made this skill script and the skill works but if won remove when the skill is done. I put in a remove command but it doesn't work, so can someone help? The script is below if you need it.
Player = game.Players.LocalPlayer
Char = Player.Character
Torso = Char.Torso
Mouse = Player:GetMouse()
function Move(key)
key = key:lower()
if key == "z" then
print ("z was pressed")
game.Players.LocalPlayer.Character.Torso.Anchored = true
for i = 1, 100, 3 do
Move = Instance.new("Part")
Move.Parent = Workspace
Move.Size = Vector3.new(math.random(4,6), math.random(4,6), math.random(4,6))
Move.Anchored = true
Move.TopSurface = 0
Move.BottomSurface = 0
Move.BrickColor = BrickColor.new("Brown")
Move.CanCollide = false
game.Players.LocalPlayer.Character.Torso.Anchored = false
y = Instance.new("BodyVelocity")
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Player.Character.Torso.CFrame.lookVector*80
Move.Parent = Workspace
y.Parent = Move
Move.CFrame = Player.Character.Torso.CFrame*CFrame.new (0, 0, -12)*CFrame.new (0,0,-i)CFrame.Angles(math.random(), math.random(), math.random())
Move.Touched:connect(function (hit)
humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid and humanoid ~= Player.Character.Humanoid then
Hitting = Instance.new("ObjectValue")
Hitting.Value = Player
Hitting.Name = "creator"
Hitting.Parent = humanoid
Move.Parent = game.Workspace
humanoid:TakeDamage(5)
Move:Remove()
wait(0.2)
Hitting:Remove()
end
end)
wait()
end
end
end
Mouse.KeyDown:connect(Move)
