Hello, my delete meshpart script is not working. Can anyone help me?
This is my code. Also by the way the code you don’t see on the top is function module.Clicked(plr,item)
then the rest of the code continues.
if plr then
if plr.Character and not plr:FindFirstChild("Piggy") then
local position
if item:IsA("Model") then
position = item.PrimaryPart.Position
else
position = item.Position
end
module.DropTools(plr,game.Workspace.map,position)
print("Dropped Keyhandles")
if game.ServerStorage.Tools:FindFirstChild(item.Name) then
local clonedTool = game.ServerStorage.Tools[item.Name]:Clone()
clonedTool.Parent = plr.Backpack
plr.Character.Humanoid:EquipTool(clonedTool)
item:Destroy()
print("Equipped The tool object")
end
end
end
end
I have been trying for a long time to get this to work but it is not working.
Can anyone resolve this issue?
Thanks!