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: Mouse Function (Link me to a Wiki Page)

Previous Thread :: Next Thread 
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:02 PM
I don't remember, but what is that function that occurs with the mouse that it'll do a function when it is hovering over a button?

Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
23 Sep 2014 01:03 PM
MouseEnter
MouseLeave
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:08 PM
Thanks
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:21 PM
I used the functions because I wanted to make it so when you hover over a button, it'll show the text box, and it'll disappear when you take the mouse off of it. However, it'll only do this process once. I want it to do this an infinite number of times. How do I do this?

plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local button = script.Parent
local text = button.Parent.TextLabel

text.MouseEnter:connect(function(x, y)
text.Visible = true
end)
text.MouseLeave:connect(function(x, y)
text.Visible = false
end)
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:23 PM
And also the textbox doesn't appear when I put my mouse over it although I made a function so that way it'll appear when the mouse enters the button!
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
23 Sep 2014 01:37 PM
These events can only be used for TextButtons.
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:38 PM
I know, this is being used for a textbutton. For a menu in a game.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Sep 2014 01:45 PM
Use text.Transparency
The Visible property normally disables most events on the item, I'm sure.
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 01:59 PM
Thanks Lunate! I just had to change text to button in the functions so it'll rely on button being highlighted instead of the box itself!
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 02:18 PM
New problem, It works just fine in studio, but Online it says that the variable plr is a nil value! Solutions?
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
23 Sep 2014 02:21 PM
On line 2 to be specific, so focus on line 2!
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Sep 2014 02:25 PM
LocalPlayer is only valid in LocalScripts
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