So here's what I had for my flashlight.
01 | light = Script.Parent.Handle.SpotLight |
02 | num = 1 |
03 |
04 | Mouse = game.Players.LocalPlayer:GetMouse() |
05 |
06 | function onClick() |
07 | if num = = 1 then |
08 | light.Enabled = true |
09 | num = 2 |
10 | else |
11 | light.Enabled = false |
12 | num = 1 |
13 | end |
14 | end |
15 |
16 | Script.Parent.Equipped:connect( function () |
17 | Mouse.Button 1 Down:connect(onClick) |
18 | end ) |
I don't know how to fix this since it isn't working. Any ideas?