|
| 30 May 2013 08:34 PM |
Can somebody make this Work?
light = 1
function lightoff() if light == 1 then light = 2 wait(1) Script.Parent.Handle.Light.Enabled = false end end
function lighton() if light == 2 then light = 1 wait(1) Script.Parent.Handle.Light.Enabled = true end end
function Key(key) if key then key = string.lower(key) if (key == "q") then lighton() if key then key = string.lower(key) if (key == "e") then lightoff() end end end end end function Equip(mouse) mouse.KeyDown:connect(Key) end script.Parent.Equipped:connect(Equip)
this is in a local script by the way.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 30 May 2013 08:54 PM |
Read the sticky on this subforum. Do not just post code and say 'It doesn't work!'. You most likely won't get a reply.
~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~ |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 09:08 PM |
Well. I see 2 probs. -You don't need to use string.lower() in hte places where you used them. -Your connection line calls the function, event, which I do not see anywhere in your script, meaning none of your functions are even being called. xP... |
|
|
| Report Abuse |
|
|