so im making a profile gui and i want it to display the users username in a Text box when opened but ive searched everywhere and i have no clue how still
Use PlayerAdded so when a player joins, you can use their name to add to the gui - http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded Use for loops to access all the player's gui - http://wiki.roblox.com/index.php?title=Loops&redirect=no#For
Use Instances to make a new text box for the player - http://wiki.roblox.com/index.php?title=Instance_(Data_Structure)
I won't write the whole script it would start off like this:
game.Players.PlayerAdded:connect(function(plr) for _, player in pairs(game.Players:GetPlayers()) local location = player.StarterGui.ScreenGui.ScrollingFrame --This is where you want to add the name local textbox = Instance.new("TextLabel") textbox.Parent = location end end)
What you could do is using a LocalScript. Here is an example
local player = game.Players.LocalPlayer local gui = game.StarterGui.Gui game.Players.PlayerAdded:connect(function() gui.TextLabel = game.Players.LocalPlayer.Name end)