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
 

What's wrong with this script How do I get a touch interest?

Previous Thread :: Next Thread 
MedievalGame123 is not online. MedievalGame123
Joined: 08 Dec 2012
Total Posts: 7144
21 Aug 2013 04:24 PM
permission = { "Key" }
Part1 = script.Parent.Parent.Part1
Part2 = script.Parent.Parent.Part2
Part3 = script.Parent.Parent.Part3
Part4 = script.Parent.Parent.Part4
Part5 = script.Parent.Parent.Part5
Part6 = script.Parent.Parent.Part6
Part7 = script.Parent.Parent.Part7
Part8 = script.Parent.Parent.Part8


Lock = 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 onTouched(hit)
print("Key")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
-- a human has touched this door!
print("heloooo world")
-- test the human's name against the permission list
if (checkOkToLetIn(human.Parent.Name)) then
print("bleh")
wait(1)
Part1.CanCollide = false
Part2.CanCollide = false
Part3.CanCollide = false
Part4.CanCollide = false
Part5.CanCollide = false
Part6.CanCollide = false
Part7.CanCollide = false
Part8.CanCollide = false
wait(3)
Part1.CanCollide = true
Part2.CanCollide = true
Part3.CanCollide = true
Part4.CanCollide = true
Part5.CanCollide = true
Part6.CanCollide = true
Part7.CanCollide = true
Part8.CanCollide = true
end
end
end

connection = Lock.Touched:connect(onTouched)



--[[ I cannot find a touch interest in basic objects?
Report Abuse
ProfitMargin is not online. ProfitMargin
Joined: 01 Aug 2013
Total Posts: 285
21 Aug 2013 04:26 PM
One it give the brick automatic touch interest
Report Abuse
MedievalGame123 is not online. MedievalGame123
Joined: 08 Dec 2012
Total Posts: 7144
21 Aug 2013 04:27 PM
It isn't doing that for me?
Report Abuse
MedievalGame123 is not online. MedievalGame123
Joined: 08 Dec 2012
Total Posts: 7144
21 Aug 2013 04:30 PM
Everything is printing but no touch interests are appearing so the cell won't open.
Report Abuse
MedievalGame123 is not online. MedievalGame123
Joined: 08 Dec 2012
Total Posts: 7144
21 Aug 2013 04:36 PM
I figured out a different way to create a cell. Problem solved.
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