Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Make a shortcut to an item in workspace?

Asked by 10 years ago

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

Log in to vote
2
Answered by
MrFlimsy 345 Moderation Voter
10 years ago

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!

0
Even better! Convorus 1 — 10y
1
If I helped, throw me a +1 :D MrFlimsy 345 — 10y
1
Also, if you click "Accept Answer," we both get rep MrFlimsy 345 — 10y
0
How do you do that?? Convorus 1 — 10y
Ad
Log in to vote
0
Answered by
KAAK82 16
10 years ago

block1 = game.Workspace.Part

block1.lalal --u get the drit?

0
Thanks! Convorus 1 — 10y
0
np... KAAK82 16 — 10y

Answer this question