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

Make a shortcut to an item in workspace?

What if I have a part in workspace and I wanted to give it a shortcut in the script.. maybe like "block1" what would I do? I am new to scripting so please help me out here.

2 answers

This is called a variable. You can set variables to instances (objects), or values such as numbers, strings, and booleans. In this case, you're setting it to an instance:

block = game.Workspace.Part

Now, when you want to use the part later in your code, you can just use 'block'.

block = game.Workspace.Part

block.Transparency = 0.5
block.Anchored = true
--etc

Hope this helped!

4 comments

0

Even better!

1

If I helped, throw me a +1 :D

1

Also, if you click "Accept Answer," we both get rep

0

How do you do that??

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