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

TextLabel text changed, help? [UnSolved]

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

We all know that you can type inside a TextBox right?

Well, when I change the text to create[Part] this script does not work..

if script.Parent.Text == "create[Part]" then
    part = Instance.new("Part")
    part.Parent = game.Workspace
end

Thank you!

2 answers

Log in to vote
1
Answered by 10 years ago

Try this!

script.Parent.FocusLost:connect(function()
    if script.Parent.Text == "create[Part]" then
        part = Instance.new("Part", game.Workspace)
    end
end)

I heard it didn't work so if it is in script try local script else I don't know, sorry!

0
I am sorry if this doesn't work but I'll try again! fireboltofdeath 635 — 10y
0
It didn't work, but I +1'd because you helped. Grenaderade 525 — 10y
0
Okay I'll keep trying because you +1'd instead of -1'd! fireboltofdeath 635 — 10y
0
I fixed it!! fireboltofdeath 635 — 10y
View all comments (7 more)
0
It connects when you click Enter or click somewhere else other than textbox and it checks if the text == create[Part] fireboltofdeath 635 — 10y
0
Thanks!!! Yay! Grenaderade 525 — 10y
0
You're welcome, tell me if you need anything else. I'll be free to help. fireboltofdeath 635 — 10y
0
It didn't work because it would start 1 time at start of server. You had to connect it when it changes or something. fireboltofdeath 635 — 10y
0
It works in Test, but it doesn't work in the real game. Screw ROBLOX! Grenaderade 525 — 10y
0
Oh. Put it in local script then try. Or if you did do local script put it in a script. fireboltofdeath 635 — 10y
0
hahaha I am stupid! I forgot to inform you IT DOES need localscript! So try with localscript I GUARANTEE it'll work! fireboltofdeath 635 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Answer

Your question doesn't seem enough for me to get

But if you mean you want it to be unable for the other players To change the text to another writting I suggest use text label in advanced objects not text box.

Did i get your problem fixed or i got the wrong idea if i did got it all wrong then sorry your question doesn't give a lot of details.

Answer this question