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
 

Broken script

Previous Thread :: Next Thread 
Bosoe is not online. Bosoe
Joined: 28 May 2011
Total Posts: 1021
06 Dec 2011 11:06 AM
print("Bosoe's Door Script loaded")
permission = {"Bosoe", "wargarkaztestplace", "Player3"}
door = script.Parent.Parent.Door
script.Parent.ClickDetector.MouseClick:connect(function(clickie)
script.Parent.ClickDetector.MaxActivationDistance = 0

function checkOkToLetIn(name)
for i = 1,#permission do
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
print("Human touched door")
if (checkOkToLetIn(human.Parent.Name)) then
for i = 1, 20 do
wait(0.03)
door.CFrame = door.CFrame + Vector3.new(0.3,0,0)
end
wait(2)
for i = 1, 20 do
wait(0.03)
door.CFrame = door.CFrame + Vector3.new(-0.3,0,0)
end
script.Parent.ClickDetector.MaxActivationDistance = 15
end)
end
end

script.Parent.Touched:connect(onTouched)




Basicly a VIP Door that slides when you walk into it then goes back, but dosen't work.
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
06 Dec 2011 11:39 AM
Im not 100% (Im not so good on scripting).
But you said Local Door With captical D
And on this line :
door.CFrame = door.CFrame + Vector3.new(0.3,0,0)
You didnt.
Report Abuse
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
06 Dec 2011 12:43 PM
For the click detector, you need a click detector on the objects in studio mode... Go to insert at the top, go to object, then look for ClickDetector
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