|
| 01 Jan 2016 01:35 AM |
Okay, so I want to use a script to move a part, but every time the part I am moving hits another part, it teleports to the top of the part it hit. Here is what I was trying:
for a=1,30 do script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.new(0,-1,0) end
So that is supposed to go upwards by 1 stud 30 times. When it hits a block above where it is trying to move to, it teleports to the top of the block it hit, how do I make it so it just slides trhough the block. WITHOUT CHANGING THE CANCOLLIDE FROM TRUE TO FALSE! |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 01 Jan 2016 01:38 AM |
| Make sure the part is anchored. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Jan 2016 01:53 AM |
| It is working now never mind |
|
|
| Report Abuse |
|
|
maxvat
|
  |
| Joined: 24 Oct 2012 |
| Total Posts: 221 |
|
|
| 01 Jan 2016 01:55 AM |
And still its not working well?
|
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 01 Jan 2016 01:56 AM |
Refer to the 3-dimensional plane (x, y, z):
"* CFrame.new(0, -1, 0)" ---------------^X ------------------^Y ---------------------^Z
You are in turn moving the part upward via the Y axis, moving it up 1 stud. I suggest you use either the X or Z axis, since those are for horizontal positioning, rather than vertical positioning.
Also, why did you include a for loop?
#code cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|