|
| 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
|
  |
| Joined: 08 Jun 2012 |
| Total Posts: 2190 |
|
|
| 17 Aug 2014 05:46 PM |
This is scripting helpers, not scripting writers.
|
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 17 Aug 2014 06:02 PM |
| Image buttons don't have a text property |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 17 Aug 2014 06:34 PM |
| @KOTwarrior i do not understand, but i editing and is not working, the text dont move |
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| 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 |
|
|