generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: And I thought this was correct...

Previous Thread :: Next Thread 
jameswowsmile is not online. jameswowsmile
Joined: 28 Dec 2012
Total Posts: 1395
19 Oct 2013 11:31 PM
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)

It does a good job but if you keep on going to it, you get in :/
Any help?
Report Abuse
MarkMcBlox is not online. MarkMcBlox
Joined: 04 May 2013
Total Posts: 873
19 Oct 2013 11:33 PM
Is this a one way door?

If not, set the door's cancollide to true.
Report Abuse
jameswowsmile is not online. jameswowsmile
Joined: 28 Dec 2012
Total Posts: 1395
19 Oct 2013 11:34 PM
Yes, it is a one way door.
Report Abuse
jameswowsmile is not online. jameswowsmile
Joined: 28 Dec 2012
Total Posts: 1395
19 Oct 2013 11:39 PM
Bump1
Report Abuse
MarkMcBlox is not online. MarkMcBlox
Joined: 04 May 2013
Total Posts: 873
19 Oct 2013 11:40 PM
Increase the pushback.
Report Abuse
jameswowsmile is not online. jameswowsmile
Joined: 28 Dec 2012
Total Posts: 1395
19 Oct 2013 11:42 PM
Ok.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image