Toby12600
|
  |
| Joined: 01 Mar 2011 |
| Total Posts: 193 |
|
|
| 07 Apr 2013 08:11 PM |
I made a basic VIP door using this script:
local Door = script.Parent function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/erik-cassel-item?id=94259360" then Door.CanCollide = false wait(5) Door.CanCollide = true else Player.Health = 0 end end end Door.Touched:connect(onTouch)
So, it will let you in if you are wearing the shirt. As you can see, I'm wearing THAT shirt. But, whenever I walk into the door, it just kills me. Is there something wrong with the script? Please help... |
|
|
| Report Abuse |
|
|
FoggedOut
|
  |
| Joined: 09 Dec 2011 |
| Total Posts: 3021 |
|
|
| 07 Apr 2013 08:14 PM |
local Door = script.Parent function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/erik-cassel-item?id=94259360" then Door.CanCollide = false wait(5) Door.CanCollide = true else Door.CanCollide = true end end end Door.Touched:connect(onTouch)
Try this. |
|
|
| Report Abuse |
|
|
Toby12600
|
  |
| Joined: 01 Mar 2011 |
| Total Posts: 193 |
|
|
| 07 Apr 2013 08:16 PM |
That just makes it so it can't kill me. I'm having the problem as being able to walk through it with the shirt. I'm wearing the shirt, but it still won't let me. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2013 08:17 PM |
You can make this script a little bit more efficient... but you should check if the player is wearing a T-Shirt.
I tested your script also with my own shirt, it works fine. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2013 08:20 PM |
Try this:
local Door = script.Parent function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/asset/?id=94259359" then Door.CanCollide = false wait(5) Door.CanCollide = true else Player.Health = 0 end end end Door.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
Toby12600
|
  |
| Joined: 01 Mar 2011 |
| Total Posts: 193 |
|
| |
|
harryx
|
  |
| Joined: 25 Oct 2008 |
| Total Posts: 3209 |
|
|
| 08 Apr 2013 06:53 AM |
| What above posted SHOULD work. |
|
|
| Report Abuse |
|
|
| |
|