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

why cant you use the same name for two parts?

Asked by
theCJarmy7 1293 Moderation Voter
8 years ago
while wait() do
    game.Workspace.qwe.Position = game.Workspace.qwe.Position + Vector3.new(0,.1,0)
end
while wait() do
    game.Workspace:FindFirstChild("qwe").Position = game.Workspace:FindFirstChild("qwe").Position + Vector3.new(0,.1,0)
end

there are two parts in the workspace called 'qwe'. the scripts above are teststo see if they would both start floating higher, but apparently, you cant use the same name for multiple parts. is t impossible to use the same name, or is there something im missing?

0
mark NRCme's answer as correct. he deserves it simply because he bothered to write it lukeb50 631 — 8y

1 answer

Log in to vote
0
Answered by
NRCme 0
8 years ago

Ok so think of it like this you have 2 friends who are identical how do you tell them apart, you can't.

Roblox can't tell the 2 parts apart because they have the same name.

I recommend making one qwe1 and the other qwe2!

0
what if you went and had 100 parts, all named qwe. then what would you do theCJarmy7 1293 — 8y
0
You would have an IntValue with a unique id for each part, and have the script check it and perform as needed. It would be smart to generate these with a script rather than manually. Pyrondon 2089 — 8y
Ad

Answer this question