roblox studio how to mention a player through their character
local function getPlayerFromCharacter(character)
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
if player.Character == character then
return player
end
end
end