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 » Scripters
Home Search
 

Re: This really sucks

Previous Thread :: Next Thread 
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
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
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
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 is not online. 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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
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 is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
27 Nov 2015 02:08 PM
gui.MouseButton1Click*


Dogemon, gotta pet them all!
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
27 Nov 2015 02:08 PM
I would prefer if I could keep my frames.. >:(
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 02:11 PM
Use what Sensei said then
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
27 Nov 2015 02:15 PM
DANGIT I JUST USED TEXTLABELS

WHY WONT MY STUPID BRAIN USE TEXTBUTTONS
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
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
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
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 is not online. 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
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
27 Nov 2015 02:22 PM
@lilblitz

You can't anymore :)
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
27 Nov 2015 02:44 PM
@lilblitz

How is my menu?
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 02:54 PM
Nice but the play button doesn't work :(
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
27 Nov 2015 02:56 PM
@lilblitz

I haven't scripted that yet.
Report Abuse
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
27 Nov 2015 02:57 PM
Oh okay, then yeah it's nice :P
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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