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: Script Help?

Previous Thread :: Next Thread 
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 06:24 PM
I would like someone to make me a script or direct me to a wiki page to where, when you type something in the TextBox it shows up on a Surface GUI and the max characters that shows up on the Surface GIU is 3. Can anyone help me?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 06:32 PM
What you can do is use the Textbox's FocusLost event, and transfer the text to wherever.

Also you should consider whether or not the SurfaceGui is local.
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 06:47 PM
script.Parent.FocusLost:connect(function(enterPressed)
if enterPressed then
script.Parent.Parent.Parent.Parent.Parent.Parent.Part.SurfaceGui.Frame.TextLabel.Text
end
end)

I got this far but how does the Text get on the Surface GUI from here?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 06:49 PM

script.Parent.Parent.Parent.Parent.Parent.Parent.Part.SurfaceGui.Frame.TextLabel.Text = script.Parent.Text
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 06:53 PM
Whats the Script.Parent.Text?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 06:54 PM
the textbox's text

also you should add a debounce
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 06:59 PM
Its not working? I got this:

script.Parent.FocusLost:connect(function(enterPressed)
if enterPressed then
script.Parent.Parent.Parent.Parent.Parent.Parent.Part.SurfaceGui.Frame.TextLabel.Text = script.Parent.Text
end
end)


Im confuzed about the debounce thing
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 06:59 PM
whats the problem
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:00 PM
When i type like "12" then press enter nothign pops up on the surface GUI
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 07:02 PM
check the path to the gui
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:02 PM
I got error saying "Part is not a valid member of Players"
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:03 PM
Alright I had to add one more Parent but now I got another error saying "Part is not a valid member of DataModel".
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:24 PM
bump
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 07:26 PM
check your .Parents again
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:32 PM
I did and I got this again "Part is not a valid member of Players"
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:38 PM
Bump
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Mar 2015 07:39 PM
surfacegui = game.Workspace.Part.SurfaceGui.TextLabel --Change that
MaxChars = 3 --the amount of characters that can show up.

script.Parent.FocusLost:connect(function(enterPressed)
if enterPressed then
surfacegui.Text = string.len(script.Parent.Text,0,MaxChars)
end
end)
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:46 PM
Would I put that int he Surface GUI as a LocalScript or Script. Or put it in the TextBox?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 07:47 PM
everything that has to do with GUIs should be a localscript.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Mar 2015 07:49 PM
Textbox, and not everything that has to do with gui's should be a local script.
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Mar 2015 07:49 PM
Alright so it does work but when I type in "123" it shows "3" when I put in "2" it shows "1" and when I put in "1" it shows "1".
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 07:53 PM
"Textbox, and not everything that has to do with gui's should be a local script."

Yes it should.

Name one thing which manages GUIs which should not be in a LocalScript.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Mar 2015 07:53 PM
Im a moron....

surfacegui = game.Workspace.Part.SurfaceGui.TextLabel --Change that
MaxChars = 3 --the amount of characters that can show up.

script.Parent.FocusLost:connect(function(enterPressed)
if enterPressed then
surfacegui.Text = string.sub(surfacegui.Text,0,MaxChars)
end
end)
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Mar 2015 07:55 PM
Ive created many NORMAL scripts inside gui's.....Infact, thats what I used to always do...But I havent done much with GUI's since the update for security.
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
06 Mar 2015 07:58 PM
That's because you don't really know what you're doing.

All GUI scripting should ALWAYS be done in LocalScripts.
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