|
| 11 Aug 2012 10:29 AM |
function groupdoor(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then local people = {"Firstnamehere", "Secondnamehere", "Thirdnamehere"} for i = 1,#people do local character = hit.Parent local player = game.Players:GetPlayerFromCharacter(character) if player.Name:lower() == people[i]:lower() then script.Parent.Transparency = .6 script.Parent.CanCollide = false wait(2.5) -- Change to how long door is open. script.Parent.Transparency = 0 script.Parent.CanCollide = true else if hit.Parent:findFirstChild("Humanoid") ~= nil then hit.Parent.Humanoid.Health = 0 end end end end end script.Parent.Touched:connect(groupdoor)
this is a script to let only 3 ppl through a door. but it lets them get in but as soon as it closes we die |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2012 10:32 AM |
i dont know whats wrong with it 'as soon as the door closes we die |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2012 10:34 AM |
| You need to change the names in the {} brackets to your names. It will currently work for anyone with the names of "Firstnamehere", "Secondnamehere" and "Thirdnamehere" |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2012 10:36 AM |
| yes i did do that in my game but it still kills me |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2012 10:40 AM |
| i think the problem is in line 13 or after |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2012 10:42 AM |
Try replacing this line
"if player.Name:lower() == people[i]:lower() then"
with this line:
"if string.lower(player.Name) == string.lower(people[i]) then"
if not, test the door in Play Solo and tell us the error in the output. |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Aug 2012 11:00 AM |
ok i tested it and it killed me when my name was in it. the door didnt even open.
output:
Vote Kicker 1.0 Loaded sourcing script doesnt exist, your command script may malfunction |
|
|
| Report Abuse |
|
|