|
| 26 Apr 2014 05:46 AM |
I put my name in the script but it won't let me access the door still.
print ("Admin Shirt Door Script Loaded")
-- list of account names allowed to go through the door. permission = {"Austin8379750"}
-- TextureId of the Admin shirt. texture = "http://www.roblox.com/asset/?version=1&id=1575139"
function checkOkToLetIn(name) for i = 1,#permission do -- convert strings to all upper case, otherwise we will let in -- "Telamon" but not "telamon" or "tELAMON" 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.5 Door.CanCollide = false wait(1) -- 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.5 Door.CanCollide = false wait(1) -- 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 admin door end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
iGobitoe
|
  |
| Joined: 29 Mar 2013 |
| Total Posts: 6690 |
|
|
| 26 Apr 2014 07:22 AM |
''upper case
you are ''austin'' not ''Austin'' |
|
|
| Report Abuse |
|
|
Zeriten
|
  |
| Joined: 05 Nov 2012 |
| Total Posts: 19839 |
|
|
| 26 Apr 2014 07:59 AM |
@Trioxide hahaha look at me im hatng on frea modles!111 pro scripssserrs1!!!!!!! |
|
|
| Report Abuse |
|
|