|
| 22 Jul 2015 01:56 AM |
script.Parent.Touched:connect(function(h) if h.Parent.Humanoid ~= nil then local door1 = script.Parent.Parent.Door1 local door2 = script.Parent.Parent.Door2 --Door1 Script local size1= 8 local size2=0.2 local position=131 local position2=134.9 for i=8,0.2,0.1 do door1.Size =CFrame.new(i,0,0) wait() end for i=131,134.9,0.1 do door1.Position = Vector3.new(0,0,i) wait() end
wait(3)
for i = 0.2,8,0.1 do door1.Size = CFrame.new(i,0,0) wait() end for i = 134.9, 131,0.1 do door1.Position = Vector3.new(0,0,i) wait() end end end)
It is suppose the change size and position sidewards. But it goes upwards and it doesnt change size Screenshot : goo(dot)gl/XnLRGI |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 22 Jul 2015 01:57 AM |
use cframing on ur door1 thing
pelicanss |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 01:58 AM |
h.Parent.Humanoid
That'll break every time it doesn't get a Humanoid.
h.Parent:findFirstChild'Humanoid' |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 22 Jul 2015 01:59 AM |
^ but cframe ur door1 positions, not vector3
pelicanss |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 01:59 AM |
door1.Size =CFrame.new(i,0,0)
Sizes are Vectoor3s, not CFrames. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 02:00 AM |
| Ah, I mixed up my size with position! |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 02:05 AM |
| Positions are not CFrames either. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 02:07 AM |
| I used findfirstchild and vector3's and it glitches. |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
| |
|
|
| 22 Jul 2015 02:15 AM |
script.Parent.Touched:connect(function(h) if h.Parent:findfirstchild'Humanoid' ~= nil then local door1 = script.Parent.Parent.Door1 local door2 = script.Parent.Parent.Door2 --Door1 Script for i=8,0.2,0.1 do door1.Size = Vector3.new(i,0,0) wait() end for i=131,134.9,0.1 do door1.Position = Vector3.new(0,0,i) wait() end
wait(3)
for i = 0.2,8,0.1 do door1.Size = Vector3.new(i,0,0) wait() end for i = 134.9, 131,0.1 do door1.Position = Vector3.new(0,0,i) wait() end end end) |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 02:20 AM |
findfirstchild
is not a function.
It's "findFirstChild", or "FindFirstChild". |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 02:33 AM |
for i=8,0.2,0.1 do
That won't work. The limit has to be greater than the initial state of the control variable. In other words, the second parameter (0.2), in that case, must be smaller than the first (8), in that case.
for i=.2,8,0.1 do door1.Size=door1.Size+Vector3.new(-.1,0,0) wait() end
should do what you want. |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 22 Jul 2015 02:37 AM |
| I hope that can be understood even though I said "smaller" where I should have said "larger". |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 09:06 AM |
This is what happens : http://goo(dot)gl/ZmO9Qv
script.Parent.Touched:connect(function(h) if h.Parent:findFirstChild'Humanoid' ~= nil then local door1 = script.Parent.Parent.Door1 local door2 = script.Parent.Parent.Door2 --Door1 Script for i=.2,8,0.1 do door1.Size=door1.Size+Vector3.new(-i,0,0) wait() end for i=134.9,131,0.1 do door1.Position = door1.Position+ Vector3.new(0,0,-i) wait() end
wait(3)
for i = 8,.2,0.1 do door1.Size = door1.Size+Vector3.new(-i,0,0) wait() end
for i=131,134.9,0.1 do door1.Position =door1.Position+ Vector3.new(0,0-,i) wait() end end end)
I tried removing the positioning bit, but it still turns out the same. :( |
|
|
| Report Abuse |
|
|