This is the code i have so far, When a user gets a new high score it needs to clear the txt file and put the new high score in it or replace the number within the txt file. I am struggling to find a way to clear the file.
ElseIf HighscoreDifficulty = "E" Then
EasyHighScore = My.Computer.FileSystem.ReadAllText("EasyHighScore.txt")
If CurrentScore > EasyHighScore Then
NewHighScore.Visible = True
file = My.Computer.FileSystem.OpenTextFileWriter("EasyHighScore.txt", True)
file.WriteLine(CurrentScore)
file.Close()
Else
NoNewHighScore.Visible = True
End If
Thanks