Hello,
I am trying to get a StringValue have the players username, how ever the value isn't updating
My script:
while true do wait(0.01) local plr = game.Players.LocalPlayer.Name script.Player.Value = plr end
My hierarchy: https://gyazo.com/2ca2662ba8011c6cc57b251df4373cad
Thanks!
Hey!
First up a local script shouldn't be in the workspace it's best that it goes in a player. If you're trying to get the name of a player into an string try something like this:
wait(3) script.parent.Value = script.Parent.Parent.Parent.Name
while having the hierarchy like this https://gyazo.com/720630a5c2b5f57ae028651c48261d5f
If you need the player name in the workspace 100% then try something like this
wait(0.01) local name = Instance.new('StringValue') name.Parent = workspace name.Value = script.Parent.Parent.Name
whilst having the script somewhere in the player. I prefer the player Starter pack but it can also go in here https://gyazo.com/cd5458b31d61d78eb259edcf43c0911e
Hope this helps!