Harkoden
|
  |
| Joined: 04 Oct 2010 |
| Total Posts: 2680 |
|
|
| 06 Feb 2012 01:06 AM |
I've edited scripts but nothing works, please help! (what does nil mean) |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2012 01:07 AM |
Here is the script: (nil means false)
print("VIP Door Script loaded")
-- list of account names allowed to go through the door. permission = {"Player1", "Player2", "Player3"}--Put your friends name's here. You can add more.
function checkOkToLetIn(name) for i = 1,#permission do -- convert strings to all upper case, otherwise we will let in, -- "conrad105," and, "builderman," but not, "blast1." -- Why? Because, "blast1," is how it is spelled in the permissions. 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 -- a human has touched this door! print("Human touched door") -- test the human's name against the permission list if (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.7 Door.CanCollide = false wait(4) -- 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 |
|
|
|
| 06 Feb 2012 06:47 AM |
| Make a gui that asks what your real name is. |
|
|
| Report Abuse |
|
|
noobkid
|
  |
| Joined: 17 Sep 2007 |
| Total Posts: 649 |
|
|
| 06 Feb 2012 08:42 AM |
@Radioaktiivinen, I think he's not talking about RL best friends :P |
|
|
| Report Abuse |
|
|
| |
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
| |
|
1Ra
|
  |
| Joined: 02 May 2010 |
| Total Posts: 2400 |
|
|
| 06 Feb 2012 12:17 PM |
Build a door, and stand next to it only letting your best friends in. I believe a door is:
|wood|Wood|Empty| |Wood|Wood|Empty| -> |Door| |Wood|Wood|Empty| |
|
|
| Report Abuse |
|
|
blargety
|
  |
| Joined: 03 Feb 2011 |
| Total Posts: 266 |
|
|
| 06 Feb 2012 04:07 PM |
| 1Ra, Isn't that for MC? This is for scripting not really MC or a model. |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2012 04:13 PM |
@blarg
No, it works on this too |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 06 Feb 2012 05:40 PM |
Stand by the door with a gun, and shoot whoever is not your best friend.
"It looks nice, but I sense a disturbing lack of Rainbow Dash and Fluttershy." |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 07 Feb 2012 04:02 PM |
| You obviously just have to tell the door, "only let my best friends in," then rub it with animal fat and... never mind, we won't go into it. |
|
|
| Report Abuse |
|
|