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 [will pay 1500 R$]

Previous Thread :: Next Thread 
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:34 PM
I am making a chat gui and everything is set up but I have a problem. If the chat message is to long, the text will get cut off.

Example: hi my name is ice from space and i love roblox
you would only be able to see
hi my name is ice from space and i

now I can not use string.len to check the length of the string because every letter is a different width and everyones name is longer or shorter so the amount of letters in there message wouldn't matter.

i can't use string.sub because i don't know where to let the script know to cut the sentence [dont want it to cut mid word]

someone please help, please don't just leave a wiki article I've been trying for 2 days now. join this game for a visual: https://www.roblox.com/games/417972868/skrupt-testung
Report Abuse
doctor152 is online. doctor152
Joined: 30 Nov 2008
Total Posts: 308
25 May 2016 08:39 PM
I suggest looking into "TextFits", a property of TextBoxes and TextLabels.

For example, if the TextBox is overflowing then using "TextBox.TextFits" will return false and vice versa.


Report Abuse
fefi_fofum is not online. fefi_fofum
Joined: 04 May 2016
Total Posts: 503
25 May 2016 08:41 PM
You can make the text fit the scale and you can make the box multi lines.
Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:42 PM
Ok so I would add

if textbox.TextFits == false then
-- make a new line splitting the text in half, and if the text is to long on the second line, do it again, etc.
end


I wouldn't know how to tell the script where to cut the text.
Report Abuse
doctor152 is online. doctor152
Joined: 30 Nov 2008
Total Posts: 308
25 May 2016 08:43 PM
I suppose you could have a loop to continuously reduce the text length until it does fit?


Report Abuse
fefi_fofum is not online. fefi_fofum
Joined: 04 May 2016
Total Posts: 503
25 May 2016 08:43 PM
Textbox.MultiLine = true
Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:47 PM
i want the text size to be the same.
Report Abuse
boatbomber is not online. boatbomber
Joined: 26 Oct 2012
Total Posts: 386
25 May 2016 08:48 PM
TextBox.TextWrapped = true
Report Abuse
fefi_fofum is not online. fefi_fofum
Joined: 04 May 2016
Total Posts: 503
25 May 2016 08:48 PM
Textbox.TextScaled = true
Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:49 PM
"I suppose you could have a loop to continuously reduce the text length until it does fit?"



Im so frustrated right now because no one is understanding me.

Think of the regular rob lox chat
notice how when ur text gets to long, rob lox breaks it into a new line underneath ur name? THATS exactly what i want to do.

Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:51 PM
No NO NO!! What aren't u guys understanding!

TextScaled changes the text size, I DO NOT want to change the size

TextWrapped, that could work except, I want the script to create a separate line underneath the name to. Not just squeeze the text into one box.
Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 08:51 PM
If u guys would join this place I could explain it a lot better.


https://www.roblox.com/games/417972868/skrupt-testung
Report Abuse
doctor152 is online. doctor152
Joined: 30 Nov 2008
Total Posts: 308
25 May 2016 08:52 PM
Ignore TextScaled, textwrapped however could prove useful. If you are determined to create an entirely new line then you can do what I said previously.


Report Abuse
boatbomber is not online. boatbomber
Joined: 26 Oct 2012
Total Posts: 386
25 May 2016 08:52 PM
roblox.wiki.com solves it all
google roblox wiki custom chat it teaches you thats how i made mine btw
Report Abuse
boatbomber is not online. boatbomber
Joined: 26 Oct 2012
Total Posts: 386
25 May 2016 08:57 PM
http://wiki.roblox.com/index.php?title=Making_a_Pseudo_chat_GUI
http://wiki.roblox.com/index.php?title=Custom_chat_GUI
http://wiki.roblox.com/index.php?title=Chat_commands
Please also thumbs up my game if this helped! https://www.roblox.com/games/346407590/Distance-Alpha
Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
25 May 2016 09:08 PM
None of those had what I needed :/
Report Abuse
SpeedySeat is online. SpeedySeat
Joined: 06 Jul 2011
Total Posts: 3048
25 May 2016 09:12 PM
ok, here's how I do:

i have a table storing each letter's length and i simply calculate the length of each line
Report Abuse
WoolHat is online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
25 May 2016 09:24 PM
This method sounds shoddy, but it works for my purposes. Certainly better than a table of every letter's dimensions, lol.

What I do is I set the TextWrapped property to true, and make the vertical height very large (What this does is align the text to fit in the box fully from the first word to the last word). Then I change the TextLabel's Y offset to the Y of its TextBounds. Easy as that.

The problem you will likely encounter is the positioning of the gui after you place it.
Report Abuse
Mr_Clockwork is not online. Mr_Clockwork
Joined: 25 Feb 2016
Total Posts: 897
25 May 2016 09:37 PM
Ohhhh I know what you mean, I'm having the same problem with my custom chat gui, what. I would do is use string.len and try to find the fasttest letter or number and then right when it's about to get cut off just subtract the string.len by like 1-3 just to be sure and then cut it off to a new line
Report Abuse
PickleMasterJohn is not online. PickleMasterJohn
Joined: 13 Dec 2011
Total Posts: 204
26 May 2016 04:35 AM
@IceFromSpace Message me
Report Abuse
AyeeEpicTroller is not online. AyeeEpicTroller
Joined: 29 Oct 2015
Total Posts: 9
28 May 2016 04:35 PM
So sorry the only way I can think of is use a diff script (msg me 4 it) but I need that 1,500 R$ btw got to follow me to msg me
Report Abuse
Katsuryoku is not online. Katsuryoku
Joined: 22 May 2016
Total Posts: 28
28 May 2016 04:44 PM
textbounds


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