Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What was this named again? L[value].Parent (Example)

Hi!

How was the folliowing script used, and named again? I'm not sure how to use it, as mine doesn't work rn.

It was something like this:

Numb = 1
L[Numb].Brightness = 1

So, it would do L1.Brightness = 1, But if i would change Numb's value to 2. It should do L2.Brightness = 1

Feeling dumb for not remembering how this was named and used again.

Another example

L[Numb] = SP.L[Numb].LightPart.LobbyLight

1 answer

✓ Accepted answer

["L" .. numb].Brightness or [L .. numb].Brightness might do it, I'm not convinced...

The problem with your code is that you're treating L as if it's a table and trying to find the index numb within it... If you give more context to why/how you're wanting this to work there might be other methods such as looping through :GetChildren() etc. that are helpful :)

1 comment

0

Thanks! That worked! GetChilder won't work for what i want, that's why :P

This discussion is preserved as it was. New answers, comments, and votes are closed.