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: how to find where text is on textlabel?

Previous Thread :: Next Thread 
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 12:44 PM
im making an emoji thing for my chat, and i have multilining. i need to find the correct X axis of where the text is, as i have already found out how to find the Y axis of it. how shuld i do this? if you need more insight, go here and make a multiline message with :D somewhere in the 2nd line or higher

https://www.roblox.com/games/657305426/coregui2#!/game-instances


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 12:46 PM
you cant find the location of a set of ##### ### need to make separate text boxes for each thing behind and in front of emojis
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 12:55 PM
how would i do that? i cant find the x axis of it


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 12:57 PM
you use text bounds and split up the text wherever an emoji is (by making new text labels, and when it hits an emoji, make a image label for the emoji, positioning it where the text bounds + position is, and then continue with another text label for other text or an emoji)
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 01:17 PM
is there a way to do it with one textlabel?


Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 02:52 PM
bump


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
01 Apr 2017 02:52 PM
Do some math with this function:

wiki.roblox.com/index.php?title=API:Class/TextService/GetTextSize


Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 02:58 PM
im already using that function, but i dont see how i could do that


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
01 Apr 2017 03:00 PM
TextBounds, find size of one of the lines, manipulate position or whatever


Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 03:13 PM
gettextsize returns the textbounds of the given text, and ive tried that in my head but i still cant figure out how to get the correct x position


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 05:15 PM
Like I said before, you have to use multiple different text labels OR add spaces where emojis will fit and then get the size of the string before it and add it to the actual position
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 05:48 PM
i still cant find the correct x position with that.


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 06:01 PM
because you dont know how to script

https://www.roblox.com/catalog/720138998/u-bad
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 06:03 PM
theres an issue with text overflow though for some reason
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
01 Apr 2017 08:46 PM
this is almost exactly what im doing. i need it to work with a textwrapped textlabel because i cant find the x position when the text is multilined on line 2 or below


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
01 Apr 2017 10:28 PM
ik idk whats its issue
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