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: VIP Door just killing, even if wearing shirt?

Previous Thread :: Next Thread 
Toby12600 is not online. 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 is not online. 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 is not online. 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
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
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
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
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 is not online. Toby12600
Joined: 01 Mar 2011
Total Posts: 193
08 Apr 2013 06:43 AM
Nothing is working :/
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
08 Apr 2013 06:53 AM
What above posted SHOULD work.
Report Abuse
commanderbly8284 is not online. commanderbly8284
Joined: 15 Feb 2009
Total Posts: 2603
08 Apr 2013 06:54 AM
Worked for me.
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