It was working before but I closed the studio and it didnt save? (i didnt save it to roblox so maybe thats why)
edit: i think i pressed no when it asked me to save
local uis = game:GetService("UserInputService")
local on = false
script.Parent.SurfaceLight.Brightness = 0
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F then
if on == false then
script.Parent.SurfaceLight.Brightness = 10
on = true
else
script.Parent.SurfaceLight.Brightness = 0
on = false
end
end
end)
was my code, but i added a task.wait(5) on the top and now it seems to work.