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

What more efficient variables in a table or variables by itself?

Asked by 10 years ago

I was wondering what will be more efficient variables in a table or by itself and why?

game.Players.PlayerAdded:connect(function(Player)
        Player.CharacterAdded:connect(function(Character)
---------------------------------------------------------
            function MakeDisplayArms()
            Vairbles = {
                CurrentCamera = game.Workspace.CurrentCamera,
                LeftArm = Character["Left Arm"],
                RightArm = Character["Right Arm"]
                        }
                print(Vairbles[1])
                --To be done
            end
            MakeDisplayArms()
        end)
end)

or

game.Players.PlayerAdded:connect(function(Player)
        Player.CharacterAdded:connect(function(Character)
---------------------------------------------------------
            function MakeDisplayArms()
                CurrentCamera = game.Workspace.CurrentCamera
                LeftArm = Character["Left Arm"]
                RightArm = Character["Right Arm"]
---------------------------------------------------------

            end
            MakeDisplayArms()
        end)
end)

Answer this question