|
| 26 Mar 2016 03:42 PM |
The mouse icon works when it leaves, just not when it enters.
script.Parent.MouseEnter:connect(function() local mouse = game.Players.LocalPlayer:GetMouse() print("Entered!") mouse.Icon = "rbxassetid://388548565" print(mouse.Icon) end)
script.Parent.MouseLeave:connect(function() local mouse = game.Players.LocalPlayer:GetMouse() print("Left!") mouse.Icon = "rbxassetid://388548464" print(mouse.Icon) end)
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 03:44 PM |
By the way, it's hovering over an Image GUI
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 26 Mar 2016 03:44 PM |
are you sure the id is valid.
you should define the mouse beforehand
loal player = game.Players.LocalPlayer local mouse = player:GetMouse() |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
| |
|
|
| 26 Mar 2016 04:09 PM |
Okay, so this is a story driven game:
StarterGui -SceneOneWindows --Frame3 ---GoogleChrome ----LocalScript
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 04:13 PM |
local mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.MouseEnter:connect(function() print("Entered!") mouse.Icon = "http://www.roblox.com/asset?id=388548565" end)
script.Parent.MouseLeave:connect(function() print("Left!") mouse.Icon = "http://www.roblox.com/asset?id=388548464" end)
|
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 04:13 PM |
You only need to define what the local mouse is once. Doing it for every function is just overkill.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 04:14 PM |
It still doesn't work, same problem.
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 04:26 PM |
The script only works when you enter or leave a part of the GUI.
You'll enter "GoogleChrome" but you'll have to fully move the mouse of that part of the GUI for it to see the "leave" function.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:19 PM |
So... how does this make a difference on changing the mouse?
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
Ortron
|
  |
| Joined: 19 Jul 2013 |
| Total Posts: 1297 |
|
| |
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 10:21 PM |
The script worked for me. I'm not sure what the problem is.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:22 PM |
Odd... There are no errors. It just changes to the default selected icon and prints entered and left
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
| |
|
|
| 26 Mar 2016 10:29 PM |
GoogleChrome is an ImageButton. It has a TextLabel inside it, and the icon is being changed by a local script. I can upload a screenshot if you would like
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
c9_io
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2642 |
|
|
| 26 Mar 2016 10:32 PM |
| The hovering icon overrode your icon |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:33 PM |
So.. how do I fix that?
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 10:34 PM |
I think I know the problem. Mouse.Icon refers to the default icon, and the dark one is a different name. Not sure if that's right though, I haven't dealt with mouse icons directly before.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:35 PM |
This post seems to say it wont work when hovering over...
http://wiki.roblox.com/index.php?title=API:Class/Mouse/Icon
But this post says otherwise...
http://wiki.roblox.com/index.php?title=Mouse_Appearance
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 10:36 PM |
Yea, that's the problem. Hovering cancels out the change.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:37 PM |
Does that mean there isn't a way to fix that?
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 26 Mar 2016 10:39 PM |
I don't believe so. I can't seem to find any tutorials on it.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2016 10:40 PM |
Darn. Was looking forward to this. Welp, better go put a suggestion in the suggestions forum. Anybody who wants to come support please come!
#code print("Its roblox. Dont " .. script.Parent.Insult1) |
|
|
| Report Abuse |
|
|
c9_io
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2642 |
|
|
| 26 Mar 2016 10:43 PM |
| Please learn to use google like seriously. There are alternatives to this but whether it is more efficient is not a 100% chance probably less efficient but |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
| |
|