Light = game.Workspace:WaitForChild("Light")

if key=="l" then Light.Pointlight.Enabled=true end

4 comments

0

I don't have any clue as to what you're trying to say. Are you trying to make the code smaller than that? Because it's already smaller itself. I will try and help you if you want it smaller.

0

Is that the full script?

0

use the context action service or userinpute service, and remember, you dont need to do it in as little lines of code, its better to have something done in 2 secs but take 100 lines instead of 10 but in 10 lines, you should care more about the efficiency and readability of the code.

0

I'd agree with rad, but if you're trying to make your code neater, use functions.