|
| 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 |
|
|
|
| 28 Jul 2015 01:16 AM |
Bump =Programmer= =Graphic Designer= -L |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Jul 2015 01:57 PM |
Pls help =Programmer= =Graphic Designer= -L |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 29 Jul 2015 08:06 PM |
Bump =Programmer= =Graphic Designer= -L |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|