Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to edit the text on a block with a gui that pops up?

Asked by
zValerian 108
5 years ago

So I want to make a script that when you click on a block, it gives you a GUI that lets you edit the text on the block. However, it doesn't seem to know what the text is. Here is the text inside the block:




function Clicked (player) if(player:findFirstChild("PlayerGui") ~= nil) and player.UserId == 179301649 then checking = player.PlayerGui:findFirstChild("this") if(checking == nil) then XD = game.ServerStorage.this:clone() XD.Parent = player.PlayerGui XD.Frame.send.MouseButton1Click:Connect(function() wait(.5) name = player.Name print(game.Players:FindFirstChild(name).PlayerGui.this.Frame.box.Text) script.Parent.text.text.Text = game.Players:FindFirstChild(name).PlayerGui.this.Frame.box.Text end) end end end script.Parent.ClickDetector.MouseClick:connect(Clicked)

Here is how the block looks: https://gyazo.com/115b24d503058a16039bfe7feb5040aa

And here is how it looks in explorer: https://gyazo.com/c0ec088ae7bad234d89f929367fec70c

This is the GUI: https://gyazo.com/432381de7485c35569dd12facb54b85d

This is how it looks in explorer: https://gyazo.com/3a957312c34239bd2f5f30ff93460a6f

Here is my issue. Every time I click ENTER(send), the text on the block updates to what was on the text before I pressed enter which was nothing. I have no idea how to make it update and say what I am typing in the textbox, it just wont work. Please help!

Answer this question