|
| 27 Nov 2015 02:03 PM |
I just spent a long time making a customization gui, and used frames for colors, only to realize I can't call Button1Down on them.
Is there any way? like
Mouse.Button1Down:connect(function() if Mouse.Position == GUI.Position then end end) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:05 PM |
Actually yes.
Mouse.X and Mouse.Y returns the X and Y position of the mouse on your screen Once you have those you can check if its in the frame like this;
if x < frame.pos.x + frame.size.x and x > frame.pos.x and y < frame.pos.y + frame.size.y and y > frame.pos.y then --code end
Instance.new("BodyVelocity",SenseiWarrior).velocity = CFrame.new(SenseiWarrior.Torso.Position,YourGirlsDMs.Position).lookVector * 10 |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:07 PM |
| You need some sort of button if you want to use MouseButton1Down. So make them into TextButtons or ImageButtons. |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 27 Nov 2015 02:07 PM |
Couldn't you just do
gui.MouseEnter:connect(function() -- code end
or is this not helpful
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:07 PM |
Yea, but I remember seeing @warspyking do something like:
if Mouse.Hit.X == Frame.Position.Scale.X/Frame.Position.Scale.X%Frame.Position.Scale.X then --code end |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:07 PM |
@Sensei That's just making the script more complicated though, it'd be much easier if he made the Frames into buttons xD |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 27 Nov 2015 02:08 PM |
gui.MouseButton1Click*
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:08 PM |
| I would prefer if I could keep my frames.. >:( |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2015 02:12 PM |
Nevermind I just stopped being lazy and made them empty-text(ed) TextLabels.
Anyways, check out my place if you want to see the Gui for it so far. The character is there too but it might fall apart.
None of it is scripted yet, just visual so far. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:15 PM |
DANGIT I JUST USED TEXTLABELS
WHY WONT MY STUPID BRAIN USE TEXTBUTTONS |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:16 PM |
| you could make a script that goes through your gui and makes text labels or buttons or whatever and copies the properties. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:20 PM |
| Haha I joined the game and stomped on the dummy like 50 times and then it flew off the map. |
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 27 Nov 2015 02:22 PM |
Just do frame.InputBegan:connect(function() end)
Gui objects take input listeners as well now. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:22 PM |
@lilblitz
You can't anymore :) |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2015 02:54 PM |
| Nice but the play button doesn't work :( |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:56 PM |
@lilblitz
I haven't scripted that yet. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 02:57 PM |
| Oh okay, then yeah it's nice :P |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 03:21 PM |
@lilblitz
Now it is working.
Todo:
-Add movement -When done with movement, begin making animations on the joints. |
|
|
| Report Abuse |
|
|