How do I script so the script takes the "customers" username from a parent

  1. What do you want to achieve? Keep it simple and clear!

I want to achive where a local script takes the customers username from a textbox where it is written up, so I can make a gui over the head that the customer is awating order.

  1. What is the issue? Include screenshots / videos if possible!
    Above.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Tried searching but found nothing.

Do you have a script or anything to start off with?

I got everything else really, like where it adds the name to the textbox depending on who ordered the food, I just need the “awaiting order” thing.

So something like type a customer’s name into the text box?

No, but I want the script to take the username from the textbox so the ui is above the right head, or it won’t really work.

Can you share the script to us so maybe I can help you with that ?

script.Parent.MouseButton1Click:Connect(function()

script.Parent.Parent:TweenPosition(UDim2.new(0.500, 0, 1.45, 50),“In”, “Linear”,1.0,true)

wait (1)

script.Parent.Parent.Visible = false

game.ReplicatedStorage.Claim2:FireServer()

game.ReplicatedStorage.GivePoint:FireServer()

end)

It isn’t that neccary to share since everything else the other script does is put what the person ordered in text boxes and what the name of her or him is.

If you have the person’s name saved, you can just do

Game.Players:FindFirstChild("PlayersName").Name --Change PlayersName to the variable that saves the players name

And that will find the player’s name.

Just put this in the text box

while true do
game.Workspace.(customer).Name = script.Parent.Text
wait(0.2)
end
1 Like

Thanks you, gonna try out now!