I made this script as if what you try to do is to make someone able to pass through an object, a door.
permission = {"Player1"}
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
print("Human touched door")
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.8
Door.CanCollide = false
wait(3.0)
Door.CanCollide = true
Door.Transparency = 0
else
end
end
end
script.Parent.Touched:connect(onTouched)
That one was to make specific person to get through.
You have to put the script inside the "door".
4 comments
G = Group ID
R = Rank #
http://wiki.roblox.com/index.php?title=Local_parts
That should help you immensely.