generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: SurfaceGUI Textbox help

Previous Thread :: Next Thread 
DirectKodiak is not online. DirectKodiak
Joined: 15 Aug 2009
Total Posts: 92
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 is not online. 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
DirectKodiak is not online. DirectKodiak
Joined: 15 Aug 2009
Total Posts: 92
20 Mar 2015 12:23 AM
Doesn't work.
Report Abuse
Ghorre is not online. 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 is not online. Proxemics
Joined: 30 Oct 2013
Total Posts: 2542
20 Mar 2015 08:25 AM
works for me
Report Abuse
DirectKodiak is not online. DirectKodiak
Joined: 15 Aug 2009
Total Posts: 92
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image