Neon part/meshpart AND decal light handler script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I have a lights handler for A-Chassis that has a decal on a transparent part which uses tween to turn the lights on and off smoothly.
    i want an actual part that has the neon texture on it in the lights as well, so the decal ones FADE, and the neon ones are LED meaning they turn on and off with no animation. similar to greenvilles light handler. i need help scripting this.

  2. What is the issue? I can’t seem to find the way to script this after trying for a couple days. i’ve managed to get the neon light to turn ON, but not off when i let go of the ‘A’ Key

  3. What solutions have you tried so far? Scripted for two days, asked the original maker of the private light handler for help, and no results so far.

Here’s the handler script that controls it. i added the line ‘body.BrakeLight.NBrake.Transparency = 0.1 or 1’ to the script, which made it turn on but im not an advanced enough scripter to understand the rest of the code.

F.updateLights = function(lights, bool)
	if lights == 'brake' then
		local tweenInfo = TweenInfo.new(.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false)
		for i,v in pairs(body.BrakeLight:GetChildren()) do
			local goal = {}
			goal.ImageTransparency = bool and 0.1 or 1
			body.BrakeLight.NBrake.Transparency = 0.1 or 1
			local a = ts:Create(v.G.ImageLabel, tweenInfo, goal)
			a:Play()
			local goal = {}
			goal.Brightness = bool and 1.5 or 0
			local a = ts:Create(v.L, tweenInfo, goal)
			a:Play()
		end
1 Like

Could you post the part where the updateLights function is called? It’s most likely an issue where you aren’t calling the updateLights function for both when you press down the ‘s’ key and release the ‘s’ key.

yeah theres another script for like all the variables and stuff i dont understand, in there it makes the value true/false if the key is up or down, which works fine for the decal lights but not the neons. ill try looking into the second one

in the script it has two blocks, one for key up and key down

here it is:

Mouse.KeyUp:connect(function(key)
local k = key:lower()
if k == ‘s’ then
handler:FireServer(‘updateLights’, ‘brake’, false)
end
end)

I think it would be easier if you posted the entire lights handler. Try to format it properly to maximise readability.

i kinda don’t want to, it’s private and im not allowed to leak it.