wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 18 Feb 2013 12:42 PM |
How would i make a one way door script force you downward with out rotating it?
door = script.Parent
function onTouch(hit) if hit.Parent == nil then return end local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil then hit.Parent.Torso.Velocity=door.CFrame.lookVector * 100 -- Push the Player back end end door.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2013 01:39 PM |
I can't test this right now, and if you haven't tried it before I do I'll get back to you, but try this:
local door = script.Parent
function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then
Use the CFrame to put them on the side of the door you want them to be. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 18 Feb 2013 03:01 PM |
I was guessing it would go like this:
door = script.Parent
function onTouch(hit) if hit.Parent == nil then return end local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil then hit.Parent.Torso.Velocity=door.BottomSurface * 100 -- Over here is the difference... end end door.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|
|
| 19 Feb 2013 08:42 PM |
hit.Parent.Torso.Velocity=Vector3.new(0,-100,0)
I THINK this is what you want. If you're wanting to force them downwards, I would also recommend forcing the character to Sit or PlatformStand. |
|
|
| Report Abuse |
|
|