this is the code i would like help TL is the model where i put the tailights for this car in TL1 is the one im currently trying to change (i will change rest later) Trail1 is when brakes are not currently being applied (or when your not pressing s) Trail2 is when brakes are being applied (or when you are pressing s)
-- lines 25 and 43 dont work but the rest of this does -- keep in mind im trying to make an extension to this code so it wont make sence -- i think its material change written incorrectly local FE = workspace.FilteringEnabled local car = script.Parent.Parent.Parent.Car.Value local handler = car:WaitForChild("Lights_FE") --- script.Parent.Parent.Parent.Values.Brake.Changed:connect(function() if script.Parent.Parent.Parent.Values.Brake.Value ~= 1 and script.Parent.Parent.Parent.IsOn.Value then if FE then handler:FireServer("Trail1") --trails off else car.Body.Trails.a0.Enabled = false car.Body.Trails.a1.Enabled = false car.Body.Trails.a2.Enabled = false car.Body.Trails.a3.Enabled = false car.Body.Trails.a4.Enabled = false car.Body.Trails.a5.Enabled = false car.Body.Trails.a6.Enabled = false car.Body.Trails.a7.Enabled = false car.Body.Trails.a8.Enabled = false car.Body.Trails.a9.Enabled = false car.Body.Trails.a10.Enabled = false car.Body.Trails.a11.Enabled = false workspace.CodingsR34.Body.TL.TL1.Material = "Plastic" end else if FE then handler:FireServer("Trail2") --trails on else car.Body.Trails.a0.Enabled = true car.Body.Trails.a1.Enabled = true car.Body.Trails.a2.Enabled = true car.Body.Trails.a3.Enabled = true car.Body.Trails.a4.Enabled = true car.Body.Trails.a5.Enabled = true car.Body.Trails.a6.Enabled = true car.Body.Trails.a7.Enabled = true car.Body.Trails.a8.Enabled = true car.Body.Trails.a9.Enabled = true car.Body.Trails.a10.Enabled = true car.Body.Trails.a11.Enabled = true workspace.CodingsR34.Body.TL.TL1.Material= "Material" end end end)
Ive found the problem actually, by reading the script i found that the material change only happens when filtering disabled is on, FE breaks this so i think i can fix the scripts now, no answer needed.