Getting player from character that is controlled by player has a built in function
game.Players:playerFromCharacter(character)
does getting player from character that is not controlled by player have one too?
here's a function you can make:
local function playerFromCharacter(char) local player=game.Players[char.Name] return player end