function getPlayerFromChat(R)for l,a in ipairs(Players:GetPlayers())do if a.Name==R.PlayerName then return a end end end
-- Find the player who sent the chat message
function getPlayerFromChat(chat)
	for _, player in ipairs(Players:GetPlayers()) do
		if player.Name == chat.PlayerName then
			return player
		end
	end
end
