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: Get the mouse's position in UDim2 terms?

Previous Thread :: Next Thread 
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
29 Dec 2014 04:07 PM
trying to make a GUI move based on the mouses height and width location on a screen.

(Like the UI from Destiny)

#ScriptMasterRace
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
29 Dec 2014 08:53 PM
b
Report Abuse
Moxiii is not online. Moxiii
Joined: 06 Mar 2012
Total Posts: 1198
29 Dec 2014 09:39 PM
local m = game.Players.LocalPlayer:GetMouse()
local udim2 = UDim2.new(0,m.X,0,m.Y)


also lol @ that hashtag
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
29 Dec 2014 10:37 PM
with the X Offset and Y Offset

subtract it by half the size of the gui

so if the gui size is UDim2.new(0,50,0,50)

it'd be

gui.Position = UDim2.new(0,m.X-25,0,m.Y-25)
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