I been trying to work on a flashlight, That's turn on or off when you click.
This is the script I worked on. I am not good at scripting but I have random ideas that may end up working.
Here is the script
function click()
if script.Parent.H5.SpotLight.Enabled == false then
script.Parent.H5.SpotLight.Enabled = false
script.Parent.Click:play()
elseif script.Parent.H5.SpotLight.Enabled == false then
script.Parent.H5.SpotLight.Enabled = true
script.Parent.Click:play()
end
end
script.Parent.Activated:connect(click)

1 comment
You can shorten it with spotlight.enabled = not spotlight.enabled.