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
 

Creative way to convert scale to offset

Previous Thread :: Next Thread 
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
27 May 2015 01:36 PM
function offset(Xx, Yy)
local x, y
local g = Instance.new("ScreenGui")
g.Size == UDim2.new(1, 0, 1, 0)
x = g.AbsoluteSize.X / Xx
y = g.AbsoluteSize.Y / Yy
g:Destroy()
return {x, y}
end

~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
27 May 2015 01:38 PM
What the hell. Please stop.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
27 May 2015 01:40 PM
News to OP: http://wiki.roblox.com/index.php?title=API:Class/Camera/ViewportSize
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
27 May 2015 01:41 PM
i said creative

:o

~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~
Report Abuse
notfruit is not online. notfruit
Joined: 21 Sep 2012
Total Posts: 1386
27 May 2015 01:44 PM
^ I can creatively make a cake out of cardboard and macaroni but that doesn't mean it will be any good.
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
27 May 2015 01:45 PM
cardboardphiliac?

~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
27 May 2015 01:48 PM
this is also creative:

local function calculatetheoffsetfromthegivenscalenumbervaluething(x,y)
error("Calculate it yourself")
end
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
27 May 2015 01:52 PM
function scaleToOffset(x,y)
local mouse = game.Players.LocalPlayer:GetMouse()

return {mouse.ViewSizeX * x, mouse.ViewSizeY * y}
end
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
27 May 2015 01:53 PM
the mouse object is deprecated.

(trololololol)

~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
27 May 2015 01:54 PM
Nope, I don't think so.
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