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: How can I make a gui follow your mouse?

Previous Thread :: Next Thread 
dylanbuider is not online. dylanbuider
Joined: 14 Jun 2008
Total Posts: 17141
29 Apr 2013 04:36 PM
m = player:GetMouse()
m.Move:connect(function()
if m.Target then
if m.Target.Name == "Button" then
-- other code
end
end
end)


I'm guessing to make a loop that ends when the mouse leaves the certain object, and in that loop have it follow the mouse cframe position and somehow calculate the (small gui frame)'s position on-screen, but not shure how to...help?
Report Abuse
dylanbuider is not online. dylanbuider
Joined: 14 Jun 2008
Total Posts: 17141
29 Apr 2013 04:41 PM
Really just don't know how to transition the positions so the gui is next to the mouse position.
Report Abuse
dylanbuider is not online. dylanbuider
Joined: 14 Jun 2008
Total Posts: 17141
29 Apr 2013 04:49 PM
Bumping.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
29 Apr 2013 04:52 PM
Give me your dominus and I will tell you.
Nah jk
I don't think it can be done (If it can it won't be easy) because different screen sizes would give off different position

Please message me so I can say someone famous PMed me :3
Report Abuse
dylanbuider is not online. dylanbuider
Joined: 14 Jun 2008
Total Posts: 17141
29 Apr 2013 04:54 PM
It can be done. I already have an idea now.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
29 Apr 2013 04:59 PM
I shouldn't hold my breath for that PM should I?
(Face turns blue)
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
29 Apr 2013 05:03 PM
I know it's possible, I'm just not sure how to do it off of the top of my head. If I spent some time and looked up what I needed to, I could help. However, I'm sure you will have already figured it out by the time I do.

~If you're generous enough: http://www.roblox.com/--item?id=97553537~
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
29 Apr 2013 05:19 PM
Make a big transparent frame, then a small frame that isnt transparent.

script.Parent.MouseEnter:connect(function(x, y) --entered the big gui
while wait() do
script.Parent.Frame.Position = UDim2.new(x, y)
end
end)

I wrote this from a phone, it probably wont work, this should give you an idea.
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