Foreign funds net selling hits RM388m as ringgit weakens