Basically, I am trying to make my cars' lights turn on by pressing L, but when I tested it, It didn't function at all.
Script:
local Headlight = script.Parent.Parent.Parent.LightParts.HeadLightPart local SurfaceLight = script.Parent.Parent.Parent.LightParts.HeadLightPart.SurfaceLight local input = game:GetService("UserInputService") input.InputBegan:Connect(function(Key) if Key.KeyCode == Enum.KeyCode.L then Headlight = Enum.Material.Neon SurfaceLight.Brightness = 5 else Headlight = Enum.Material.SmoothPlastic SurfaceLight.Brightness = 0 end end