Why is my VehicleSeat localscript not working?
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:
01 | local Headlight = script.Parent.Parent.Parent.LightParts.HeadLightPart |
02 | local SurfaceLight = script.Parent.Parent.Parent.LightParts.HeadLightPart.SurfaceLight |
04 | local input = game:GetService( "UserInputService" ) |
05 | input.InputBegan:Connect( function (Key) |
06 | if Key.KeyCode = = Enum.KeyCode.L then |
07 | Headlight = Enum.Material.Neon |
08 | SurfaceLight.Brightness = 5 |
10 | Headlight = Enum.Material.SmoothPlastic |
11 | SurfaceLight.Brightness = 0 |