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

Anyhow that I can Shorten this Script, it looks so repetitive?

local remote1 = workspace.remote1
local remote2 = workspace.remote2
local remote3 = workspace.remote3

local theme1 = workspace.theme1
local theme2 = workspace.theme2
local theme3 = workspace.theme3

Is there a way to shorten this script?

1 answer

✓ Accepted answer
local remote1, remote2, remote3 = workspace.remote1, workspace.remote2, workspace.remote3
local theme1, theme2, theme3 = workspace.theme1, workspace.theme2, workspace.theme3

I would also recommend you change your variables to text instead of numbers as it my cause unexpected errors.

Never mind ignore what I just edited in, I wasn't thinking.

3 comments

0

How would I access them, eg if remote2.BrickColor == theme2.BrickColor then print("Hello")

0

They are still the same just not on multiple lines. So yes you would access them like that.

0

Did this help?

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