|
| 27 Nov 2014 12:05 AM |
repeat door.Size = Vector3.new(door.Size.x, door.Size.y - 0.2, door.Size.z) door.CFrame = door.CFrame + Vector3.new(0, 0.1, 0) wait(0.05) until (door.Size.y == 0.2) end
Alright that should work, right?
It's simple, the door is simply rising and is continuously shrinking.
Then, it'll reach it's smallest size limit, 0.2 in which it will stop. Right?
Wrong. Nope, the brick decides to fly away once the brick's y gets to 0.2.
So is there some way to keep the repeat and have roblox actually recognize its own size limit that the brick has finally arrived at?
Thanks! |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 27 Nov 2014 12:11 AM |
Usually positions aren't exact, so you can't compare it to the end product exactly try >= |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2014 12:32 AM |
Also, this is a result of it not being anchored because, when you resize it it destroys the welds that were holding it in place, but for the door animation your cframing it back into place every time, but once the loop ends it is free to fly away.
Anchoring it solves the issue instantly |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2014 12:52 AM |
IT was anchored...
Anyway thanks max you gave me an idea!
I actually decided to make it < 0.3 so that once it got to 0.2 it would stop instead of have to rush and check. Thanks! |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 27 Nov 2014 10:18 PM |
| Did it work? I've always told people that, but never tested it myself lol |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2014 10:19 PM |
| door.Size.Y not door.Size.y |
|
|
| Report Abuse |
|
|
burlone
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 22 |
|
| |
|
burlone
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 22 |
|
| |
|
burlone
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 22 |
|
| |
|
burlone
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 22 |
|
| |
|
burlone
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 22 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|