generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: i need help fixing this

Previous Thread :: Next Thread 
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
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
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
11 Aug 2012 10:32 AM
i dont know whats wrong with it
'as soon as the door closes we die
Report Abuse
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
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
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
11 Aug 2012 10:36 AM
yes i did do that in my game but it still kills me
Report Abuse
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
11 Aug 2012 10:40 AM
i think the problem is in line 13 or after
Report Abuse
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
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
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
11 Aug 2012 10:45 AM
Ok
Report Abuse
AliveCupajoe is not online. AliveCupajoe
Joined: 12 Nov 2010
Total Posts: 4085
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image