Okay, I'm making this nametag, and the top field of the nametag is the name, how do I get it to change the text to the name of the user when somebody wears it?

Here's my code, I would think it would work, I didn't get an error either when I put the hat on.

while true do
local Target = script.Parent
local Username = game.Players:GetUserIdFromNameAsync()

Target.Text = Username
wait(5)
end

Thanks!

1 comment

0

You just localed that getting Player Service with firing an event called GetUserIdFromNameAsync, it have no error because GetUserIdFromNameAsync is a part of Player Service. Change it!