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: Moving Image Label to text?

Previous Thread :: Next Thread 
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 03:27 PM
I want to make a custom chat GUI that symbolizes certain words. For Instance, If I were to say, "Have a nice day! :)", an ImageLabel would replace the word ":)" with an actual Smile picture. What would I have to learn, or do, to make this possible?


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 03:31 PM
Bump [1]


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
23 Jun 2016 03:35 PM
First of all, you'd have to have basic knowledge of GUI's.

I'm still kind of new to this so here's what I would do:

if TextBox.Text == ":)" then
local smileGui = Instance.new("ImageLabel", TextBox) -- Create a new ImageLabel GUI
smileGui.Size = UDim2.new(1, 0, 1, 0) -- Cover the entire TextBox
smileGui.Image = (INSERT IMAGE LINK HERE FOR A SMILEY FACE)
smileGui.ZIndex = TextLabel.ZIndex + 1
end


That's what I would do if you find out the TextBox text is ":)"
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 03:41 PM
I have knowledge on GUIs, It's just this one thing that's bothering me. Also, I would use string manipulation [I know this already], but I don't know how to place the image Over the text where ":)" Is located. Like twitch for example, some of Its emojis and how they work.


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 03:44 PM
Bump [2]


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 03:55 PM
Bump [3]


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 04:16 PM
Bump [4]


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 05:02 PM
Bump [5]


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
Ninja_Deer is not online. Ninja_Deer
Joined: 31 Dec 2009
Total Posts: 97
23 Jun 2016 05:06 PM
Lot of bumps.

You probably want to go learn how to manipulate strings.

http://wiki.roblox.com/index.php?title=String_pattern

Basically, become master with strings. That's the first step.

Then you gotta go through the string and look for keywords. (Hint, string.gmatch)

Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 05:07 PM
Yea, but how would I move the Image to the text?


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
Ninja_Deer is not online. Ninja_Deer
Joined: 31 Dec 2009
Total Posts: 97
23 Jun 2016 05:10 PM
You won't ask that if you understood how guis work and how to string manipulate.
Report Abuse
HexaDecival is not online. HexaDecival
Joined: 13 Dec 2015
Total Posts: 144
23 Jun 2016 06:08 PM
I dont have too much expereince with string manipulation but I'd s
string.find the last letter of the smiley face ")" and create an image inside the textlabel, and then I'd set the X.Offset of the image to (WIDTH * POS) + OFFSET

Where WIDTH is the pixel width of each letter in the textlabel
POS is the substring position of the character retreived by string.find
OFFSET is some value u can use to offset the smiley face from the ")" so you can position it Inbetween the ":)"
Report Abuse
Borsy is not online. Borsy
Joined: 31 Jul 2014
Total Posts: 15111
23 Jun 2016 06:16 PM
why has nobody mentioned textbounds yet
use a localscript and get the textlabel's TextBounds.X, move the image label to UDim2.new(0,text.Position.X.Offset + text.TextBounds.X,0,text.Position.Y.Offset)


Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 07:12 PM
Thanks Guys, but I want It directly over the symbol. Just like in XAT, or Twitch's chatboxes.


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
Report Abuse
Borsy is not online. Borsy
Joined: 31 Jul 2014
Total Posts: 15111
23 Jun 2016 07:14 PM
what are you talking about


Report Abuse
fullajeh is not online. fullajeh
Joined: 30 Jan 2013
Total Posts: 196
23 Jun 2016 07:16 PM
Sorry, i was on the earlier comments lol. Testing the others out right now.


~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~
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