Hello. While scripting a light system for like 50+ cars in my game, I ran into a problem with the reverse lights.
Script:
local seat = script.Parent.Parent.Parent:FindFirstChild("VehicleSeat")
seat:GetPropertyChangedSignal("Throttle"):Connect(function()
if seat.Throttle == -1 then
script.Parent.Material = Enum.Material.Neon
elseif seat.Throttle == 0 or seat.Throttle == 1 then
script.Parent.Material = Enum.Material.SmoothPlastic
end
end)
Error: