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: Gui editing when a mouse hovers it

Previous Thread :: Next Thread 
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:19 PM
local f = script.Parent.Parent.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Move:connect(function()
local line = script.Parent.MouseLine
local target = mouse.Target
if not target then
line.Visible = true
script.Parent.Parent.BackgroundColor3 = BrickColor.new('Really black').Color
script.Parent.TextColor3 = BrickColor.new('Toothpaste').Color
script.Parent.FontSize = 8
script.Parent.Parent.BackgroundTransparency = .4
script.Parent.Parent.Size = UDim2.new(0, 400, 0, 43)
end
if target then
line.Visible = false
script.Parent.Parent.BackgroundTransparency = .6
script.Parent.Parent.Size = UDim2.new(0, 400, 0, 40)
script.Parent.FontSize = 7
script.Parent.Parent.BackgroundColor3 = BrickColor.new('Black').Color
script.Parent.TextColor3 = BrickColor.new('Black').Color
end
end)


It only works when the mouse is on the sky, and that's what needs fixed
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
19 Jan 2014 04:21 PM
Try switching around 'if not target' and 'if target'
Report Abuse
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:22 PM
k
Report Abuse
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:23 PM
it does the same thing, except it has to hit a brick to activate...
Report Abuse
zakarq is not online. zakarq
Joined: 10 Oct 2010
Total Posts: 883
19 Jan 2014 04:24 PM
Could you use MouseEnter and MouseLeave?
Report Abuse
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:24 PM
the mouse is what i mean by it just so you know
Report Abuse
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:25 PM
i dont know how to use much when it comes to stuff like this, i'm not very experienced
Report Abuse
zakarq is not online. zakarq
Joined: 10 Oct 2010
Total Posts: 883
19 Jan 2014 04:26 PM
Look on the Roblox wiki
Report Abuse
zakarq is not online. zakarq
Joined: 10 Oct 2010
Total Posts: 883
19 Jan 2014 04:27 PM
script.Parent.MouseEnter:connect(function()
--Code here
end)

script.Parent.MouseLeave:connect(function()
--Code here
end)
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
19 Jan 2014 04:28 PM
Oh, WHOOPS
I thought this was a mouse cursor thing for a tool or something

Yeah, use mouseenter and mouseleave
Report Abuse
fire243 is not online. fire243
Joined: 04 Apr 2010
Total Posts: 6532
19 Jan 2014 04:30 PM
it worked thx
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