tinarg
|
  |
| Joined: 18 Jun 2010 |
| Total Posts: 4925 |
|
|
| 05 Aug 2014 11:34 PM |
| I used it exactly like it's supposed to be used. This same piece of code has worked in the past and now it decided not to... Uhh... what's going on here? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
tinarg
|
  |
| Joined: 18 Jun 2010 |
| Total Posts: 4925 |
|
|
| 05 Aug 2014 11:37 PM |
| :GetModelCFrame() isn't working either... This isn't funny guys. I'm on candid camera, right? Right guys? .... guys? GUYYYS!? |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:38 PM |
| Both of you aren't even using them right. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:38 PM |
| Why dont you explain something for once then, you know, since youre the obvious genius here |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:39 PM |
| Oh, same person. You're not even using them right. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:39 PM |
| @Sensei, I can't explain if I don't even know what the problem with his script is. But I just know he isn't using it right, because I've been through this before. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:41 PM |
| His problem is that he's either not using it on a model or he has defined it as something else |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 05 Aug 2014 11:41 PM |
| Post an example of the code you're using. I just tested both the methods you're having trouble with, and they work as expected. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:41 PM |
| Exactly, which means he isn't using it right. Now stop. |
|
|
| Report Abuse |
|
|
tinarg
|
  |
| Joined: 18 Jun 2010 |
| Total Posts: 4925 |
|
|
| 05 Aug 2014 11:42 PM |
OH FRDJSFNSKJFNK I'M AN IDIOT! I WAS TRYING TO CALL TRANSLATEBY BY ON A MODEL'S CHILDREN, NOT THE MODEL ITSELF! I SWITCHED UP THE VARIABLES! D:
I'm just gonna sit in the corner and contemplate life now. |
|
|
| Report Abuse |
|
|
tinarg
|
  |
| Joined: 18 Jun 2010 |
| Total Posts: 4925 |
|
|
| 05 Aug 2014 11:43 PM |
*TRANSLATYBY
I need to quit scripting/foruming late at night... These typos make me sound like an idiot. :| |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:43 PM |
| That's not a valid method. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:43 PM |
| For parts, you can use part.Position = part.Position + Vector3.new(0,0,0) or part.CFrame = part.CFrame * CFrame.new(0,0,0) |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 05 Aug 2014 11:44 PM |
| It's ok; we've all had late-night brain farts. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:45 PM |
| You shouldn't get in the habit of using TranslateBy, or what above is doing(suuper sloppy) |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 05 Aug 2014 11:46 PM |
| Why wouldn't you? It's cleaner than finding the average position of the parts and then moving each part individually. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 11:49 PM |
| No. You can't use TranslateBy with big models, or it looks like they're all teleporting each one by one (In online mode). If you think PlaceRebuilder uses this for his models, you're wrong. |
|
|
| Report Abuse |
|
|
tinarg
|
  |
| Joined: 18 Jun 2010 |
| Total Posts: 4925 |
|
|
| 06 Aug 2014 12:15 AM |
| Well. these models I'm translating won't have more than 50 parts. They're player-made, and I've placed restrictions to prevent stuff like that from happening. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Aug 2014 02:08 AM |
I don't see why you don't just use SetPrimaryPartCFrame. TranslateBy and GetModelCFrame should be deprecated in favor for SetPrimaryPartCFrame and GetPrimaryPartCFrame. |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 06 Aug 2014 02:12 AM |
| The primary part isn't necessarily in the center of the model. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Aug 2014 02:16 AM |
| The primary part is something you set. There is no center of the model unless you physically define the start vector and the end vector and just divide them by 2. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Aug 2014 02:17 AM |
| And GetModelCFrame and MoveTo rely on the PrimaryPart, if none is found it probably returns some average CFrame/MoveTo. And the average is most likely not going to be the center. |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 06 Aug 2014 02:23 AM |
| I did a quick test, and GetModelCFrame is not based on the primary part, nor is it the average position. It's the center of the the model's bounding box. Getting that information would be difficult otherwise, so there's no reason to deprecate that method. |
|
|
| Report Abuse |
|
|