如何在这里使用变量?

我想要它找到 LocalPlayers 的名字,但实际上它没有做任何事情。我该如何修复它?

plr = game.Players.LocalPlayer.Name
x = Game.Workspace.Living.'plr'.StandMorph.StandSkin.Value
print(x)
点赞
用户10548420
用户10548420
本地玩家名字:`game.Players.LocalPlayer.Name`

获取玩家 **姓名变异** 的 **皮肤** 值:`Game.Workspace.Living.'plr'.StandMorph.StandSkin.Value`

输出本地玩家名字:`print(tostring(plr))`

输出玩家姓名变异皮肤值:`print(tostring(x))`

并且请确认您是否完全执行了此代码,以免出现随机返回或忘记回调函数情况。
2021-08-24 21:42:56
用户16014788
用户16014788

为了获得具有字符串的子项,您可以使用方括号。

plr = game.Players.LocalPlayer.Name
x = Game.Workspace.Living[plr].StandMorph.StandSkin.Value
print(x)
2021-09-03 07:03:33