of     1   

Bakerley
#58883388Wednesday, November 30, 2011 6:58 PM GMT

Okay, so I'm making this super awesome card/pass/hand/sensor door And I have a hand sensor that I made Here's the first script: Activate = script.Parent.Activator local users = {"rossb654mail","Player"} --you can add more player's here function onTouched(hit)     for _, username in ipairs(users) do         if hit.Parent.Name:lower() == username:lower() then     Activate.Disabled = false     wait(0.01)     Activate.Disabled = true                                   end     end end script.Parent.Touched:connect(onTouched) Now, you're probably thinking "Hmm? what is Activate?" Well, that is another script. I activate other scripts to test that it works, then I merge into one. Here's the other script: light = script.Parent.Parent.Light door = script.Parent.Parent.Door sensor = script.Parent             script.Parent.Script.Disabled = true             light.BrickColor = BrickColor.new(1009)             sensor.BrickColor = BrickColor.new(1009)             wait(1)             light.BrickColor = BrickColor.new(1020)             sensor.BrickColor = BrickColor.new(1020)             for i = 1, 30 do             wait(0.01)             door.CFrame = door.CFrame * CFrame.new(0.2,0,0)             end             wait(3)             for i = 1, 30 do             wait(0.01)             door.CFrame = door.CFrame * CFrame.new(-0.2,0,0)             end             light.BrickColor = BrickColor.new(1004)             sensor.BrickColor = BrickColor.new(194)             script.Parent.Script.Disabled = false Okay, so when this activates, the script is stuck. The "light" and "sensor" are stuck on New Yeller. [That's the 1009 Colour Code in this script] Why is this happening? I was thinking that you can't put a wait in a script without a function But you cannot use while, looped, onTouched or onClicked on this sort of thing that's meant to activate when the correct person touches the sensor Sorry if this is confusing XD Please help :)
Bakerley
#58923316Thursday, December 01, 2011 5:19 PM GMT

bump
VIPdude007
#58923650Thursday, December 01, 2011 5:36 PM GMT

You got your capitals and lowers correct? I only scanned through.
pokelord910
#58923844Thursday, December 01, 2011 5:47 PM GMT

1) what is da script meant to do 2) any output
Bakerley
#58924567Thursday, December 01, 2011 6:24 PM GMT

No output. Come to my place, I'll show you.
Bakerley
#58924617Thursday, December 01, 2011 6:26 PM GMT

Oh snap, he's offline. The script, roughly: Someone touches the sensor If their name is in permission, the light goes yellow to process [Just to make it look better XD] Then it goes green. Door slides open. Wait 3/4 seconds Door closes. Light turns red. Where I said the light changes colour, so does the sensor, but the sensor is grey so when the light goes red, sensor goes grey. :D
Bakerley
#58924642Thursday, December 01, 2011 6:27 PM GMT

I suggest you read the end of my first post. :D
VIPdude007
#59521914Tuesday, December 13, 2011 9:46 PM GMT

Wait, isn't the word "script" meant to be changed to "Script" a capital "S"?
Scriptishish
#59522045Tuesday, December 13, 2011 9:48 PM GMT

^ NOOOOOOOOOOOOOOOOOOOOOOOOOOOOO script is script, to refer to itself. Just like workspace is workspace, in reference to itself.
Bakerley
#59522047Tuesday, December 13, 2011 9:48 PM GMT

Nope. I fixed this with a debounce and merged some scripts together, the script is working perfectly now :D
pokemon771
#59522117Tuesday, December 13, 2011 9:49 PM GMT

How did you use the tab on the forum? Or how did you indent on the forums?
iBaconButty
#59522121Tuesday, December 13, 2011 9:49 PM GMT

wouldnt it be easyer to do; function onTouched(hit) if hit.Parent.Name == ("bob") or hit.Parent.Name == ("Vipdude007") then door open/ close thingy here and anything else else end end ?? people make scripting so difficult ...! bob -- maker of scripty thingies for people who make life complicated lol ;D
iBaconButty
#59522159Tuesday, December 13, 2011 9:50 PM GMT

oooo annnnnd script.Parent.Touched:connect(onTouch)
Bakerley
#59522162Tuesday, December 13, 2011 9:50 PM GMT

Pokemon, it automatically does it That's why some parts were missed out
pokemon771
#59522219Tuesday, December 13, 2011 9:51 PM GMT

Not for meh. :c
iBaconButty
#59522317Tuesday, December 13, 2011 9:52 PM GMT

wouldnt my way work alot easyer? :p bob -- maker of scripty thingies for people who make life complicated lol ;D
pokemon771
#59522534Tuesday, December 13, 2011 9:56 PM GMT

@bob I think it would be better to use a table. Users = {"pokemon771", "Telamon"}

    of     1