Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
|
| 17 Jun 2017 03:04 PM |
So I have a part that I want to tween (CanCollide = true), let's call it PartA
The problem is that whenever I tween PartA, and it touches another part (Also CanCollide = true), PartA's position changes. Is there any way I can avoid that? |
|
|
| Report Abuse |
|
|
itz_koko
|
  |
| Joined: 05 Apr 2017 |
| Total Posts: 15 |
|
|
| 17 Jun 2017 03:09 PM |
| go ### lolololololololololololololoo jk go ### plz lolololololololo |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 03:11 PM |
It sounds like you are tweening the part with Vector3, so I highly recommend you use CFrame instead. This avoid parts from colliding with others.
CFrame = CFrame.new(x,y,z)
(Optional) If you are rotating the basepart as well, you need to use CFrame.Angles. This instance measures in radians, so you need to use math.rad(). This will convert it to degrees.
CFrame = CFrame.new(x,y,z)*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
|
|
|
| Report Abuse |
|
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
|
| 17 Jun 2017 03:29 PM |
| I forgot to tell that I am tweening size. I tried using CFrame but without success. Of course, there is a possibility that I did something incorrectly. Any ideas? |
|
|
| Report Abuse |
|
|
Vangief
|
  |
| Joined: 28 May 2017 |
| Total Posts: 66 |
|
|
| 17 Jun 2017 03:36 PM |
| you really cant resize a part with CFrame since its position. You use a Vector3, since size is a Vector3 value. |
|
|
| Report Abuse |
|
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
|
| 17 Jun 2017 03:56 PM |
| Unfortunately, Vector3.new is not working. If you have any, even complicated ideas, let me know! |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 04:01 PM |
Size will not change its position when it interferes with another part, as long as you're using CFrame to change its position.
Can I get a look at the script you made? I think I might be able to fix it.
|
|
|
| Report Abuse |
|
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
| |
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
| |
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
| |
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
|
| 17 Jun 2017 04:54 PM |
Are you trying to resize it on only one direction? If you resize it from 3 studs long to 4 studs but you only want one end to get longer then you have to CFrame the center position of the Part. |
|
|
| Report Abuse |
|
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
|
| 17 Jun 2017 05:00 PM |
| Basically, the position is the same, until the part becomes large enough to hit other parts. When it touches other parts, part moves up = position gets changed. |
|
|
| Report Abuse |
|
|
Eppobot
|
  |
| Joined: 08 May 2012 |
| Total Posts: 210 |
|
| |
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
|
| 18 Jun 2017 06:51 PM |
Hmm, I'm not sure. What if you CFrame it to the same spot every time it changes size so it stays there?
If the physical size of the Part isn't a big deal, just make it a Mesh and change the Scale of the Mesh with the script. |
|
|
| Report Abuse |
|
|