Quna
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 538 |
|
|
| 20 Jun 2012 07:43 AM |
I have a vip door to my place. However, the door only works ONCE, and then it just ignores me afterwards...?
asset = 84054778
script.Parent.Touched:connect(function(hit) player = game.Players:getPlayerFromCharacter(hit.Parent) if game:GetService('BadgeService'):UserHasBadge(player.userId, asset) then script.Parent.CanCollide = false script.Parent.Transparency = .6 wait(5) script.Parent.CanCollide = true script.Parent.Transparency = 0 else hit.Parent:BreakJoints() end end) |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2012 07:51 AM |
| Ok I know Whats Wrong Wait A Second And I will script you a new one. |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2012 07:58 AM |
Ok Heres My Script I Made in 2010 :)
--Script Made By Superninja42 -- 2010 print ("VIP Shirt Door Script Loaded")
permission = {"YOURNAMEHERE"}
texture = "http://www.roblox.com/Item.aspx?ID=84054778"
function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end
local Door = script.Parent
function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then if human.Parent.Torso.roblox.Texture == texture then --the shirt Door.Transparency = 0.7 Door.CanCollide = false wait(4) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 -- a human has touched this door! print("Human touched door") -- test the human's name against the permission list elseif (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.7 Door.CanCollide = false wait(2) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 else human.Health = 0 -- delete this line of you want a non-killing VIP door end end end
script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
Quna
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 538 |
|
|
| 20 Jun 2012 07:59 AM |
| Thanks alot, but do you have to wear the t-shirt to make it work? |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
| |
|
Quna
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 538 |
|
|
| 20 Jun 2012 08:06 AM |
| Hmm, doesnt really work tho :/ |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2012 08:12 AM |
Are you putting the shirts id on the doors script, Tell me the shirt and i will get its ID. |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2012 08:15 AM |
| Ok I know Why let me Give me a sec |
|
|
| Report Abuse |
|
|
|
| 20 Jun 2012 08:18 AM |
Ok Fixed It I Put The Wrong ID In
--Script Made By Superninja42 -- 2010 print ("VIP Shirt Door Script Loaded")
permission = {"YOURNAMEHERE"}
texture = "http://www.roblox.com/asset/?id=84054778"
function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end
local Door = script.Parent
function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then if human.Parent.Torso.roblox.Texture == texture then --the shirt Door.Transparency = 0.7 Door.CanCollide = false wait(4) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 -- a human has touched this door! print("Human touched door") -- test the human's name against the permission list elseif (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.7 Door.CanCollide = false wait(2) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 else human.Health = 0 -- delete this line of you want a non-killing VIP door end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 20 Jun 2012 08:19 AM |
| Isn't the asset ID change in-game aswell? |
|
|
| Report Abuse |
|
|
Quna
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 538 |
|
| |
|