📜  如何获取玩家位置 Roblox - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:29.993000             🧑  作者: Mango

代码示例1
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
        while humanoidRootPart do
            print(player.Name,"is at",tostring(humanoidRootPart.Position))
            wait(4)
        end
    end)
end)