Change a Actor name with ENV

Hey~

So I was using a script for make a Event say the PC Username with
Code:
str = ENV["USERNAME"]
Easy.
But I was wondering if there is a way to actually change the Actor name using this code.
Because if I make for example a NPC say "username", well it would show the PC Username, but if I just type username in the command for change the actor name, it dosn't work.
I was wondering if there is a way for changing the name of a character with a ENV term.
Thaaaanks!
So I was using a script for make a Event say the PC Username
First thing first, put the link to the script you're using.
First thing first, put the link to the script you're using.

Oh, sorry. ^-^"
I found the script here: https://www.rpgmakercentral.com/topic/27558-looking-for-a-script-that/
But I edited it a bit, replacing the ENV COMPUTERNAME with USERNAME.
Code:
$game_actors[ID].name = ENV["USERNAME"]
$game_party.members[index].name = ENV["USERNAME"]
These script calls should work.
One is based on actor IDs, the other is based on party position.
Replace the ID with a valid actor ID, and replace the index with the index of the party member you want to change the name for. Note that the index starts from 0, which is the party leader.
Code:
$game_actors[ID].name = ENV["USERNAME"]
$game_party.members[index].name = ENV["USERNAME"]
These script calls should work.
One is based on actor IDs, the other is based on party position.
Replace the ID with a valid actor ID, and replace the index with the index of the party member you want to change the name for. Note that the index starts from 0, which is the party leader.

It worked!!
Thanks a lot! ^-^
You're awesome.

Original thread: https://forums.rpgmakerweb.com/threads/change-a-actor-name-with-env.107247/