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: Does this exist?

Previous Thread :: Next Thread 
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
17 Aug 2013 10:30 PM
How do I get a parts corner position? I`m trying to make a destructable wall.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
17 Aug 2013 10:32 PM
oh god

local pos = part.Position

local corner = Vector3.new(pos.X + part.Size.X/2, pos.Y + part.Size.Y/2, pos.Z + part.Size.Z/2)

play around with adding and subtracting to find what gives you what corner
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
17 Aug 2013 10:39 PM
That`s exactly the same way I did it. I was looking for another method since that does not work when the part is rotated.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
17 Aug 2013 10:45 PM
mate you are getting into hacky and annoying script territory
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
17 Aug 2013 10:47 PM
That`s the way I like it. I already made the script, It`s just glitchy if I use unanchored parts. I was thinking of somehow adding in it`s rotation, But I got lost after that.
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
17 Aug 2013 10:56 PM
No one has any ideas at all how I could approach this differently?
Report Abuse
Newtrat is not online. Newtrat
Joined: 13 Jun 2011
Total Posts: 196
17 Aug 2013 11:57 PM
My guess would be

local offset = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z/2)
local corner = part.CFrame:vectorToWorldSpace(offset)

Does that work at all?
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
18 Aug 2013 01:50 AM
Bump
Report Abuse
Cakins is not online. Cakins
Joined: 23 Jul 2009
Total Posts: 307
18 Aug 2013 03:51 AM
I think this is it? Man, I am getting into lots of rotation scripts today. This should give you one corner, though honestly I don't know which :/

part = workspace.Part

a = Vector3.new(part.Size.X / 2, part.Size.Y / 2, part.Size.Z / 2)
corner = a * part.CFrame.lookVector
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
18 Aug 2013 04:15 AM
My least favorite people on the internet(are of course idiots) are people who use ` in a conjunction... WHY DO PEOPLE USE THAT?!

"I'm not Singaporian!" - CeaselessSoul
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
18 Aug 2013 04:20 AM
Because I was born left handed, Problem?
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
18 Aug 2013 04:24 AM
Ceaseless, you mean a contraction, not a conjunction ;)
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
18 Aug 2013 05:13 AM
Nope LookVector returns a Vector3 with values between 0-1 and anything * 0 would be 0 so that would mess it up.
Report Abuse
thewhiteshark is not online. thewhiteshark
Joined: 14 Jun 2012
Total Posts: 212
18 Aug 2013 05:15 AM
@CeaselessSoul: It`s just a habit I picked up when I was young. Ignore it or i`ll ignore you.
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