Help with accessing a value within the players client when clicking a textbutton which has the players name then returning the value to a text label

right so, what im trying to do is when i click a textbutton with a players name it will return the players callsign which is a value stored on the players client how would i do that?

2 Likes

Wait that was misunderstanding.
So you want to get player’s callsign that is stored when you click textbutton with player’s name?

Basically, https://gyazo.com/acb5e04c562b686bdcd28d7000c1a317 you see how it has a text label called callsign I want the text to be the players callsign which is stored in a value.

what do you need it for? maybe someone knows another way

Basically, https://gyazo.com/acb5e04c562b686bdcd28d7000c1a317 you see how it has a text label called callsign I want the text to be the players callsign which is stored in a value. So when they first login there’s a textbox asking for them to input their callsign then when they do there’s a string value which changes to what they entered in the text box.

How do you store that callsign value on client side?
Do you use data store or you want to get it from client changed textbox?

sorry im not going to click any links why do you need a callsign? whats it for?

There’s a textbox which the player inputs their callsign into then the string value changes to what they put in the textbox.

you mean like a nickname?

the player enters a value and you make that value their game tag?

Let me put it simply, it’s simply just text which is stored in a string value.

ok i got it. Wait a bit i will make it in roblox studio)

ok, so thats p easy. You use a text box.
Textboxes have an event called FocusLossed which passes parameters that tell you if enter was pressed and the type of input that caused the focus loss. (focus loss means the player is no longer typing in the text box). So you can just connect a function that checks if enter was pressed and if it was it gets the TextBox.Value property.

You should look up TextBox in the roblox API
https://developer.roblox.com/en-us/api-reference/class/TextBox

That’s not really what I’m trying to achieve.

To make it as simple as POSSIBLE once the player logs in they enter text into a textbox then what they entered is saved into a stringvalue. So when I open up a frame which finds every player in game and clicks on a certain player i want it to return the value which was saved and = it to a textlabel.

im too lazy and busy to write out the code but what i said still applies. only difference is that when the player presses enter you copy the TextBox.Value and copy it to a stringvalue. Then parent the stringValue to the player that joined and reference it later when you need it.

Why would I need to do that to save the value… I can simply just do value = textbox.text

haha I should have this post deleted because i have made working prototype)

That wont work as the server can’t interact with plrgui

It will work because server call local script that take the text of text box then returns the plr callsign oh sorry) i pasted searching plr in client side( but you need only call sign ahah)
also check this article.

Also the plrname in serverscript will not work as it’s meant to get the playername from the text of a textbutton