Problem: I'm not sure how to make it go away with this method? It does print the statements, but I'm not sure why it won't delete the part?
local tool = script.Parent
local event = script:WaitForChild("EventConnection")
local Tween_Service = game:GetService("TweenService")
local Debris = game:GetService("Debris")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer
local position_target_part = nil
tool.Equipped:Connect(function()
print("Equipped")
local position_target_part = ReplicatedStorage.AttackPositionPart:Clone()
position_target_part.Parent = game.Workspace.Attack_Effects
while position_target_part ~= nil do
position_target_part.Position = player:GetMouse().Hit.Position
wait()
end
end)
tool.Unequipped:Connect(function()
print("Unequipped")
position_target_part = nil
end)```