TextBox Not Working On SurfaceGui

Hello, I am making a system where the user types a player’s name on a computer (in-game) and it gives them an item. I am having trouble with the textbox to write the player’s name in, I cannot use the textbox when it is on the SurfaceGui, textboxes on ScreenGui work perfectly fine. I don’t know if this is an intended feature or a bug.

4 Likes

I think TextBoxes deliberately don’t work on SurfaceGuis because other players can see the content written on them. It’s to stop people from seeing swears and other bad stuff

4 Likes

That makes sense, do you have any ideas on how I could integrate a textbox without it having to be in a screengui?

I guess you could make it so that when you click the computer it makes a ScreenGui appear and you can write from there

SurfaceGuis need to be in PlayerGui (either directly placed there or copied via StarterGui) to capture user input, text box or otherwise. It’s got nothing to do with swearing. Text boxes are modified by clients, so other clients can’t see what’s written on them to begin with because client-side changes to the Text property don’t replicate as per the client-server model.

cc @bluddbrain

6 Likes

My bad, so you’d just put the SurfaceGui in StarterGui and set its Adornee to a part and do all the stuff from there

3 Likes

Thanks so much, I will try that

1 Like

I tried setting the Adornee to the part and putting the gui in StarterGui but nothing showed up when I tested.

1 Like

Are you setting it up correctly? Because I have a SurfaceGui with the adornee set to the part and it works like this

image image

7 Likes

I have it exactly like that but it wont show up

Are you sure about that? Have you thoroughly checked your SurfaceGui that the properties are set up correctly and all? Here’s a repro file where the SurfaceGui appears on the top of the part.
Adorned SurfaceGui.rbxl (23.1 KB)

2 Likes

Okay, I will make sure my settings are correct and if I cant figure it out I will use your file, thank you both for your help!

Hey I ran into the same problem, I did the adornee thing. My surface gui is on a tool so it’s suppose to move around but when I equip the tool the UI spawns were the tool use to be instead of attaching to the actual tool.

2 Likes

Did you find a fix to it? I’m on the same problem too :skull: