Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

User Input, Making a Username In-game?

I've seen it in some games, and i think it would be a great feature in my game. However, the great thing know as "un-education" on User Input, lacks on my part.

How would i do the following:

Make it where in a Gui, it will say "Type a username", then have an area where one could type their username. WHAT do i use for them to type it in? A Textlabel, button, what?

Then, what do i script to make them able to change their in-game username to that? I don't know anything about userinput, and i haven't seen any tutorials on it.

Would someone mind helping me with this?

1 answer

for "Type a Username" do a TextBox, for the username to appear make a BillBoard and assign it to players head then put a textlabel inside the billboard and put the characters name inside the textlabel.

Put this code in a localscript

local Player = game.Players.LocalPlayer
local TB  = script.Parent.TextBox --TB = TextBox
local BB = game.ReplicatedStorage.NameBoard --BB = BillBoard

TB.FocusLost:connect(function(enter)
	if enter then -- if player presses enter
		BC = BB:Clone() --BC = BBClone
		BC.Adornee = Player.Character.Head
		BC.Label.Text = TB.Text -- Label is a textlabel
		BC.Parent = Player.Character.Head
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.