tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
|
| 20 Apr 2014 04:09 PM |
Ok, so I'm making a door that can accept different levels of cards, so Level 4 can open level 1,2,3,4 but Level one can only open level 1, ect. So, it's not working. Here's the script if someone could point out the problem.
print("Door Script loaded")
permission = { "Level1", "Level2", "Level3", "Level4" } nopermission = { "CardB", "CardA" } Door = script.Parent.Parent.Door Sensor = script.Parent
function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end function notOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(nopermission[i])) then return true end end return false end
function onTouched(hit) print("Sensor Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then if (checkOkToLetIn(human.Parent.Name)) then wait(0.1) Door.Transparency = 1 Door.CanCollide = false wait(3) Door.CanCollide = true Door.Transparency = 0 elseif (notOkToLetIn(human.Parent.Name)) then wait(1) end end
end
connection = Sensor.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
| |
|
|
| 21 Apr 2014 04:32 PM |
OUTPUT. YOU THINK WE FIGURE OUT YOUR PROBLEMS? |
|
|
| Report Abuse |
|
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
|
| 21 Apr 2014 04:36 PM |
| Yeah, you guys help figure out my problems. |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2014 04:39 PM |
No we dont. How about you go back to figuring out your scripts because we dont really care about your problems, we just enjoy helping others. If you dont cooperate, I suggest leaving.
http://www.roblox.com/link-to-place?id=123274290 |
|
|
| Report Abuse |
|
|
tommyfun
|
  |
| Joined: 04 Jan 2011 |
| Total Posts: 1404 |
|
|
| 21 Apr 2014 04:42 PM |
| Perhaps you look at the name of the forum. "Scripting Helpers" Also, what about that forum you posted, asking for help. I suppose you should also get out for asking how to fix it. |
|
|
| Report Abuse |
|
|