|
| 30 Jun 2014 06:57 AM |
while script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) do --check that script.Parent.CFrame=script.Parent.CFrame*CFrame.new(0.2,0,0) wait() end while true do wait(0.1) print'Checking' if script.Parent.Position ~= script.Parent.Parent.DoorStop.Position then print'Stoped' script.Parent.DoorOpen.Open.Value = true end end
Well I am trying ot make it so when the "door" moves to the defined position it will stop,
here is the model, much easier,
Local script in starter gui and door in workspace.
http://www.roblox.com/SH-item?id=163931688
Please help. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 30 Jun 2014 06:59 AM |
"while script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) do"
I'd recommend doing
while true do if script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) then
from past experience |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 07:02 AM |
Why don't you just make a set loop to close the door? Getting two positions to line up is unreliable and inefficient. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 07:05 AM |
| Just moves like 1 inch then stops, |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 07:06 AM |
| And how would I do that, great wizard? |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 07:13 AM |
| Wizard, and your magic pumkin. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Jun 2014 07:43 AM |
You're going to have to change things to get the door to move how far you want it to.
for i = 1,10 do script.Parent.CFrame=script.Parent.CFrame*CFrame.new(0.2,0,0) wait() end
for i = 1,10 do script.Parent.CFrame=script.Parent.CFrame*CFrame.new(-0.2,0,0) wait() end
|
|
|
| Report Abuse |
|
|
|
| 30 Jun 2014 09:13 AM |
| ! THANK YOU!!!!! BLESS YOU *Muwah* *muwah* |
|
|
| Report Abuse |
|
|