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 » Scripting Helpers
Home Search
 

Re: Text appear with MouseEnter on GUI?

Previous Thread :: Next Thread 
brian30001 is not online. brian30001
Joined: 10 Oct 2009
Total Posts: 78
17 Aug 2014 05:44 PM
Hello! i need help, i'm looking for a script having the function when I pass the mouse to "ImageButton" a text appears, and disappears when removing, Thanks you
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
17 Aug 2014 05:46 PM
This is scripting helpers, not scripting writers.

Report Abuse
brian30001 is not online. brian30001
Joined: 10 Oct 2009
Total Posts: 78
17 Aug 2014 06:01 PM
i'm new using scripts, only i krow one MouseEnter script, to expand a button

local BigSize = UDim2.new(0,200,0,150)
local NormalSize = UDim2.new(0,190,0,140)

script.Parent.MouseEnter:connect(function()
script.Parent.Size=BigSize
end)

script.Parent.MouseLeave:connect(function()
script.Parent.Size=NormalSize
end)

but i dont krow how to appear text in a ImageButton, well i need help
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
17 Aug 2014 06:02 PM
Image buttons don't have a text property
Report Abuse
brian30001 is not online. brian30001
Joined: 10 Oct 2009
Total Posts: 78
17 Aug 2014 06:05 PM
Yea i know, but i want to appear a text in the screen, like the shop gui, you pass the mouse over a button and appear a text saying the cost, etc
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
17 Aug 2014 06:11 PM
ok, so, keep the textlabel above or below the screen, visible.

newpos = UDim2.new(0,0,0,0); -- make it so it's middle of screen
oldpos = UDim2.new(0,0,0,0); -- the starting position, adjust
label = script.Parent.TextLabel; -- make it the label to move in
image = script.Parent; -- to hover on

image.MouseEnter:connect(function()
label:TweenPosition(newpos, "Out", "Quad", 1, true);
end)

image.MouseLeave:connect(function()
label:TweenPosition(oldpos, "Out", "Quad", 1, true);
end)
Report Abuse
wrightracer3n is not online. wrightracer3n
Joined: 09 Nov 2011
Total Posts: 964
17 Aug 2014 06:23 PM
What I would do is just have a TextLabel inside the GUI then using .MouseEnter and .MouseLeave, Parent that TextLabel inside the different Images and change the Text to whatever depending on what the TextLabel's current Parent is.

- WrightRacer3n
Report Abuse
brian30001 is not online. brian30001
Joined: 10 Oct 2009
Total Posts: 78
17 Aug 2014 06:34 PM
@KOTwarrior i do not understand, but i editing and is not working, the text dont move
Report Abuse
brian30001 is not online. brian30001
Joined: 10 Oct 2009
Total Posts: 78
17 Aug 2014 06:53 PM
Help pls
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
18 Aug 2014 02:56 AM
That script posted above must be a local script
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
18 Aug 2014 03:25 AM
@smiley

I'm pretty sure it is a LocalScript, I mostly use it for my GUIs I script.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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