📅  最后修改于: 2022-03-11 15:00:31.333000             🧑  作者: Mango
local Players = game:GetService("Players")
local function getPlayerByUserId(userId)
for _, player in pairs(Players:GetPlayers()) do
if player.UserId == userId then
return player
end
end
end