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: Why is my script broken?

Previous Thread :: Next Thread 
austin8379750 is not online. austin8379750
Joined: 30 Jan 2008
Total Posts: 983
26 Apr 2014 05:46 AM
I put my name in the script but it won't let me access the door still.

print ("Admin Shirt Door Script Loaded")

-- list of account names allowed to go through the door.
permission = {"Austin8379750"}

-- TextureId of the Admin shirt.
texture = "http://www.roblox.com/asset/?version=1&id=1575139"

function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in
-- "Telamon" but not "telamon" or "tELAMON"
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
if human.Parent.Torso.roblox.Texture == texture then --the shirt
Door.Transparency = 0.5
Door.CanCollide = false
wait(1) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
elseif (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.5
Door.CanCollide = false
wait(1) -- 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 admin door
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
26 Apr 2014 05:57 AM
>my script

...
Report Abuse
iGobitoe is not online. iGobitoe
Joined: 29 Mar 2013
Total Posts: 6690
26 Apr 2014 07:22 AM
''upper case

you are ''austin'' not ''Austin''
Report Abuse
Zeriten is not online. Zeriten
Joined: 05 Nov 2012
Total Posts: 19839
26 Apr 2014 07:59 AM
@Trioxide
hahaha look at me im hatng on frea modles!111 pro scripssserrs1!!!!!!!
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