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 » Game Design
Home Search
 

Re: Mouse Coordinates and Positioning

Previous Thread :: Next Thread 
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
28 Jul 2015 12:46 AM
I have this little thing I'm working on where you click on the screen and it creates a frame based on your mouse coordinates. Now, I want to make it work on Frames,Buttons, and what not. I'm having a problem though. Say I click a button and I want the Frame to appear on where I clicked the button, how do I do this?


=Programmer= =Graphic Designer= -L
Report Abuse
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
28 Jul 2015 01:16 AM
Bump
=Programmer= =Graphic Designer= -L
Report Abuse
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
28 Jul 2015 02:30 AM
Bump
Report Abuse
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
28 Jul 2015 01:57 PM
Pls help
=Programmer= =Graphic Designer= -L
Report Abuse
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
28 Jul 2015 02:09 PM
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local GUI = player.PlayerGui.PlayerGui

function MakeBox()
local f = Instance.new("Frame",gui)
f.Position = UDim2.new(0,mouse.X-(f.Size.X/2),0,mouse.Y-(f.Size.Y/2))
f.ZIndex = 10
end
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
28 Jul 2015 02:20 PM
or, if you want the frame where the button is, just make a frame, make it your size, and put it where the button is...

UDim2 ofc
Report Abuse
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
29 Jul 2015 04:04 PM
I don't think I explained right.

http://gyazo.com/40a99753b8e461b280c88a77976fc2be
This gif might help.

If I do what I'm trying to do normally, like make a frame appear where the mouse is on a screen, it works. But what I want to do is parent the frame to for example a button but still make it appear at the same position of the mouse? Does that make sense?

=Programmer= =Graphic Designer= -L
Report Abuse
AnorakHalliday is not online. AnorakHalliday
Joined: 11 Jul 2013
Total Posts: 328
29 Jul 2015 08:06 PM
Bump
=Programmer= =Graphic Designer= -L
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
30 Jul 2015 08:47 PM
try.. umm.. not using scale on the buttons I guess. that seems like a challenge mathmatically.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
30 Jul 2015 08:52 PM
mathematically*
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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