I don’t really now why im getting this error because i force equip the tool, but when i come too closer to the target im getting this error.
This is a video:
And this is the script:
if not game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool") then
local Tool = game.Players.LocalPlayer.Backpack:FindFirstChildOfClass("Tool")
hum:EquipTool(Tool)
hum:MoveTo(Mesh - CFrame.new(HumanoidRootPart.Position, Mesh).LookVector * 3)
hum.MoveToFinished:Connect(function(P_)
if Tool.Parent == plr.Character then
Tool:Activate()
else
while Tool.Parent == plr.Character do
Tool.Parent = plr.Character
wait(.2)
end
Tool:Activate()
end
Tool.blade.Touched:Connect(function(DM)
if DM.Parent.Parent == game.Workspace.Folder and DM.Parent.CurrentHealth ~= 0 then
while DM.Parent.Parent == game.Workspace.Folder and DM.Parent.CurrentHealth ~= 0 do
Tool:Activate()
wait(.2)
end
else
hum:UnequipTools()
end
end)
end)
end
I hope anyone can help me.