vendo88
|
  |
| Joined: 11 Jan 2011 |
| Total Posts: 769 |
|
|
| 16 Feb 2014 06:35 PM |
local DoorOpen =script.Parent.Door.Position function onTouched(hit) DoorOpen = Vector3.new(0, 50, 0) wait(4) DoorOpen = Vector3.new(0, 157.5, 0)
end |
|
|
| Report Abuse |
|
|
Laedere
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 23601 |
|
| |
|
vendo88
|
  |
| Joined: 11 Jan 2011 |
| Total Posts: 769 |
|
| |
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 16 Feb 2014 06:38 PM |
| Setting a variable to a property will simply make the variable equal to what the property is at that time. Therefore, if that function was ever called, you'd simply be changing the variable and not the property. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 06:38 PM |
| Use CFrame, Vector3 is the Vector Position which can mess it up a lot and CFrame is the coordinate frame position |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 06:39 PM |
You're changing the variable not the value
local DoorOpen = script.Parent.Door function onTouched(hit) DoorOpen.Position = Vector3.new(0, 50, 0) wait(4) DoorOpen.Position = Vector3.new(0, 157.5, 0)
end |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 06:40 PM |
local DoorOpen =script.Parent.Door function onTouched(hit) DoorOpen.Position = Vector3.new(0, 50, 0) wait(4) DoorOpen.Position = Vector3.new(0, 157.5, 0) end
--Add connection line too |
|
|
| Report Abuse |
|
|