PATH, being an environment setting, can only be set from inside the shell that uses it. This means that you cannot use any external scripts to change it. The command in the script only changes the script's environment, which is lost when it closes.
I wrote up a detailed explanation of how the environment works the last time someone asked about this. You might have found it if you had done a search before posting.
The only ways you can change the PATH, other than manually, are through A) sourcing
, which imports the code into the current shell's environment and executes the commands there, or B) through the use of a shell function
, which is like a script, but sits inside the current environment and therefore can affect it directly.