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
 

If size is bigger than one...

Previous Thread :: Next Thread 
UndeleteTool is not online. UndeleteTool
Joined: 15 Mar 2012
Total Posts: 1851
06 May 2013 05:48 AM
Can someone give me the code for this?
-- if script.Parent.size is bigger than 1 then
end
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
06 May 2013 05:54 AM
use the size.x,y,z properties
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 May 2013 06:10 AM
function Check(Obj)
if Obj.Size.X > 1 then
print("Object Size.X is higher then 1")
elseif Obj.Size.Y > 1 then
print("Object Size.Y is higher then 1")
elseif Obj.Size.Z > 1 then
print("Object Size.Z is higher then 1")
else
print("No Object was higher then 1")
end
end

Check(Game:GetService("Workspace").Part)
Report Abuse
doneyes is online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
06 May 2013 06:52 AM
size1 = brick1.Position.X + brick1.Position.Y + brick1.Position.Z

size2 = brick2.Position.X + brick2.Position.Y + brick2.Position.Z



if brick1 > brick 2 then
print("Brick 1 is larger.")

if brick1 < brick 2 then
print("Brick 2 is larger.")

if brick1 == brick 2 then
print("Brick 1 and Brick 2 are the same size.")




I think this will work.
Report Abuse
doneyes is online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
06 May 2013 06:53 AM
Whoops, change position to Size. I didn't mean to put that there.
Report Abuse
IHaveAllDemFriends is not online. IHaveAllDemFriends
Joined: 05 Apr 2013
Total Posts: 41
06 May 2013 07:01 AM
if script.Parent.Size = Vector3.new(1, 1, 1) then
//Script script script here
else
//Script here, or null...
end
Report Abuse
WillieTehWierdo200 is not online. WillieTehWierdo200
Joined: 13 Aug 2008
Total Posts: 1147
06 May 2013 09:00 AM
Technically, if you want to talk about size, you should think of volume. Volume of a rectangular prism is width*height*depth. So the volume of any part should be:

    volume = part.Size.X*part.Size.Y*part.Size.Z
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