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: HELP ME FIX THIS SCRIPT? [100 ROBUX REWARD]

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 12:37 AM
It works, but on hover I want all of them to stay CENTERED and have the one that grows push the other two out of the way. They all start at size {0, 300},{0, 150}. I need a script to put into all three of the buttons. Nothing is really, "Wrong", it's just, well, look at the place. I need them to stay centered as if they're being pushed out of the way for the one that grows to have room. You can look at it here: http://www.roblox.com/Distortionals-Place-Number-222-place?id=168787773

local one = script.Parent
local two = script.Parent.Parent.Hunter
local three = script.Parent.Parent.Warlock

script.Parent.MouseEnter:connect(function()
one:TweenSizeAndPosition(UDim2.new(0,375,0,187.5), UDim2.new(.4,0,0,0),"Out","Linear",.1)
two:TweenSizeAndPosition(UDim2.new(0,262.5,0,131.25), UDim2.new(.4,0,0,160),"Out","Linear",.1)
three:TweenSizeAndPosition(UDim2.new(0,262.5,0,131.25), UDim2.new(.4,0,0,320),"Out","Linear",.1)
end)

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:05 AM
b1

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 09:46 AM
b2

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 09:49 AM
mk

What's the size of the GUI?
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 09:50 AM
Nvm, dumb question.

Try using the offset for the position.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 09:51 AM
Using the what? Sorry, I'm a bad scripter. :(

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 09:54 AM
Lol. I'll explain it.

On the position of GUIs, there's 4 values, X Scale, X Offset, Y Scale and Y Offset.

The offsets are in pixels, meaning the gui will always be in the same position.

The scale is a percentage of the players screen. Like if you put the size to 0.5 on the X offset, it'd cover half their screen and if you set it to 0.25 it'd be 25% of their screen.

tell me if you need more explaining it might be a bit confusing...
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 09:57 AM
I know that, but I need to keep the things centered in the screen.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 10:00 AM
Err, centered on the Y axis?

What you want to do is set the Y Scale to 0.5 and get the Y Size(Offset) and divide it by 2 and put the Y Offset(On the position) to -Y Size/2

Like this:

guiYSize = 20

gui.Position = {0, 0} {0.5, -10} -- -10 is guiYSize divided by 2

.3. its hard to explain
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 10:01 AM
wat

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 10:04 AM
;-;


I'm assuming you want them centered in the Y axis so just set their position to this...

{0, whatever here},{0.5, -75}
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
30 Jul 2014 10:06 AM
This will keep any GUI centered on the X and Y axes:

ScreenGui.YourGui.Position = UDim2.new(0.5, -(ScreenGui.AbsoluteSize.X / 2), 0.5, -(ScreenGui.AbsoluteSize.Y / 2))
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 10:16 AM
Whoever can give me a full script will get 100 robux. :{

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
samthemagicman is not online. samthemagicman
Joined: 20 Mar 2011
Total Posts: 1225
30 Jul 2014 10:20 AM
can you explain what you want better?

.3.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 10:23 AM
Well, all GUI's need to stay centered along the Y axis. When you hover over a button, I want that button to grow, and the other ones to shrink away, and on MouseLeave, I want it to tween back to normal.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 10:40 AM
bump

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 10:45 AM
bumping again.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
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