|
| 10 Mar 2015 02:06 AM |
I'm doing a project which needs help for anyone who can just simply script and move things and such.
This is the a piece part of my project I'm creating in it's temporary design: http://prntscr.com/6ey70t
What I'm trying to do is be able (in game) click on the Surface GUI. Then it will pop out a Screen GUI (a small bar) and type in what you want to type. Then click enter and the text you type (limited amount of letters depending on the size of the box) will pop up in the Surface GUI exactly how you typed it in the Surface GUI. |
|
|
| Report Abuse |
|
|
Ghorre
|
  |
| Joined: 15 Feb 2015 |
| Total Posts: 160 |
|
|
| 10 Mar 2015 05:22 AM |
Insert following into Your explorer:
1. part named GUIPart into workspace
2. into GUIPart: 2.1. ClickDetector 2.2. Script (name it ShowScreenGui for easier reference) 2.3. SurfaceGui
3. TextLabel into SurfaceGui
4. ScreenGui into StarterGui
5. into ScreenGui: 5.1. TextLabel named txt 5.2. TextButton named submit
6. script into submit (name it SubmitValue)
The scripts: [ShowScreenGui] local sp = script.Parent local cd = sp.ClickDetector
cd.MouseClick:connect(function(plyr) local gui = plyr.PlayerGui.ScreenGui gui.txt.Visible = true gui.submit.Visible = true end)
[SubmitValue] local label = game.Workspace.GUIPart.SurfaceGui.TextLabel local button = script.Parent local plyrGui = button.Parent
button.MouseButton1Click:connect(function() label.Text = plyrGui.txt.Text plyrGui.txt.Text = "" plyrGui.txt.Visible = false plyrGui.submit.Visible = false end)
There is a place for improvement (like text clipping, the looks ect.) - I'll leave that up to You ;) |
|
|
| Report Abuse |
|
|
| |
|
Ghorre
|
  |
| Joined: 15 Feb 2015 |
| Total Posts: 160 |
|
|
| 20 Mar 2015 06:41 AM |
| I did make that in studio before posting so You obviously have done something wrong. |
|
|
| Report Abuse |
|
|
Proxemics
|
  |
| Joined: 30 Oct 2013 |
| Total Posts: 2542 |
|
| |
|
|
| 20 Mar 2015 09:47 PM |
| I've tried it 3 times and I don't know what I'm doing wrong. Is there a way you could put it on youtube or make a model for it? |
|
|
| Report Abuse |
|
|