EppobotJoin Date: 2012-05-08 Post Count: 210 |
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? |
|
itz_kokoJoin Date: 2017-04-05 Post Count: 15 |
go ### lolololololololololololololoo jk go ### plz lolololololololo |
|
|
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))
|
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
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? |
|
VangiefJoin Date: 2017-05-28 Post Count: 66 |
you really cant resize a part with CFrame since its position. You use a Vector3, since size is a Vector3 value. |
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
Unfortunately, Vector3.new is not working. If you have any, even complicated ideas, let me know! |
|
|
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.
|
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
PM sent |
|
ScottiflyJoin Date: 2011-01-30 Post Count: 9180 |
Anchor the Part. |
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
It is anchored. |
|
ScottiflyJoin Date: 2011-01-30 Post Count: 9180 |
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. |
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
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. |
|
EppobotJoin Date: 2012-05-08 Post Count: 210 |
Ideas? |
|
ScottiflyJoin Date: 2011-01-30 Post Count: 9180 |
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. |
|