I'm trying to get an equip tool to enable a SpotLight when you press "F". I'm also trying to get the tool to turn off when you press "F" again. Any help on this? I've been trying to fix it.
local tool = script.Parent
local light = script.Parent.Handle.SpotLight
tool.Selected:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "f" then
light.Enabled = true
else
light.Enabled = false
end
end)
end)

1 comment
It doesn't work.