The first problem is that you are not checking if the player is chatting, that means if they say "Hello friend", it has a D and the part will delete, to fix this, use 2nd argument of the userinputservice inputbegan function so do:
UserInputService.InputBegan:Connect(function(input,isTyping)
if isTyping then return end
if input.KeyCode == Enum.KeyCode.D then
end
end)
the second problem is that the remote event in both scripts is differently named, so thats why it doesnt delete
LocalScript:
local Delete = ReplicatedStorage:WaitForChild("Delete")
ServerScript:
local DeletePart = ReplicatedStorage:WaitForChild("DeletePart")
to fix it change the name of the remote event to "DeletePart and in the localscript, change it to deletepart
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DeletePart = ReplicatedStorage:WaitForChild("DeletePart")
local UserInputService = game:GetService("UserInputService")
local part = game.Workspace.Part
UserInputService.InputBegan:Connect(function(input,isTyping)
if isTyping then return end
if input.KeyCode == Enum.KeyCode.D then
print("C is Pressed, and the part is going to destroy shortly!")
DeletePart:FireServer(part)
end
end)